Question
Can't get apache rewrites to work
Hi,
I’ve setup a droplet with Ubuntu LAMP on 14.04, enabled mod_rewrite using sudo a2enmod rewrite and confirmed this with phpinfo().
I’ve also setup a vhost with using the following config:
<VirtualHost *:80>
ServerAdmin foo@foo.co.uk
ServerName foo.com
ServerAlias dev.foo.com
DocumentRoot /var/www/dev_foo/public_html/application/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
My 000-default.conf file is this:
<VirtualHost *:80>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
But I can’t get it to work, any tips?
Thanks
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×