I've always configured Apache like this:
/etc/httpd/conf/httpd.conf (Main Apache config)
<Directory />
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/var/www/html">
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>
Virtualhosts config
<VirtualHost *:80>
ServerName xxxxx.co.uk
ServerAlias xxxxx.co.uk xxxxx
DocumentRoot /var/www/html/xxxxx.co.uk
ErrorLog /var/www/log/xxxxx.co.uk
<Directory "/var/www/html/xxxxx.co.uk">
AllowOverride None
Options -Indexes -FollowSymLinks
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
I've noticed that some people seem to create a specific folder for web content and logs, i.e
/srv/html/xxxxx.co.uk
/srv/log/xxxxx.co.uk
I wonder if anyone could throw any light onto why that is? Is it more secure to do it like this? Are there any other reasons to move web content content and logs out of the /var/..... path?
Thanks in advance :-)