PDA

View Full Version : [ubuntu] Apache2 virtual host config



jlhughes
January 18th, 2009, 04:56 AM
I have apache2 installed and working. I'm now adding virtual hosts.

I can access "free.mydomain.com/index.html" but I get "Forbidden" when I attempt to access "free.mydomain.com"

I know this is an easy fix, but I can't remember the solution.

Here's the site-available file (with mydomain.com substituted):

<VirtualHost *>
ServerAdmin webmaster@mydomain.com
#We want to be able to access the web site using www.dev.example.com or dev.example.com
ServerName free.mydomain.com
DocumentRoot /home/www/free
CustomLog /var/log/apache2/freefriday-access.log combined

# Protect files and directories from prying eyes:
<Files ~ "(\.(conf|inc|module|pl|sh|sql|theme|engine|xtmpl)| Entries|Repositories|Root|scripts|updates)$">
order deny,allow
deny from all
</Files>

# Set some options
Options -Indexes
Options +FollowSymLinks

# Customized server error messages:
ErrorDocument 404 /index.php

</VirtualHost>

superprash2003
January 18th, 2009, 05:45 PM
http://www.cyberciti.biz/faq/apache-403-forbidden-error-and-solution/