I've installed CentOS 6.3 with Apache 2.2 on a VM. I'm trying to set up a LAMP stack with these VirtualHosts:
localhostloads the path/var/www/html/lcl.mydomain.comloads the path/var/www/html/dev_lcl/
In httpd.conf I added:
NameVirtualHost XXX.XXX.XXX.XXX:80
Then I added the virtualhosts.conf file:
<VirtualHost XXX.XXX.XXX.XXX:80>
DocumentRoot /var/www/html/
ServerName localhost
<Directory "/var/www/html/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/httpd/error_log_localhost
CustomLog /var/log/httpd/access_log_localhost "combined"
</VirtualHost>
<VirtualHost XXX.XXX.XXX.XXX:80>
DocumentRoot /var/www/html/dev_lcl/
ServerName lcl.mydomain.com
<Directory "/var/www/html/dev_lcl/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/httpd/error_log_dev_lcl
CustomLog /var/log/httpd/access_log_dev_lcl "combined"
</VirtualHost>
This gives me the error:
client denied by server configuration
When I remove AllowOverride All both ServerNames load, but mod_rewrite doesn't work and I need it. How can I resolve this?