PDA

View Full Version : 403 errors and virtual hosts


tommywds
26th June 2006, 15:45
Hi guys

I've just installed FC5 and I'm want to host a few sites on it. I've read up on Virtual Hosts, and it seams OK and not too complex. So I gave it a stab and made all the settings to the httpd config file. At the end of the file I added the following

NameVirtualHost *:80
<VirtualHost *:80>
ServerName bob.office.com
ServerAdmin bob@office.com
DocumentRoot /home/tom/public_html
ErrorLog /home/tom/logs/bob.office.com
</VirtualHost>

I have a DNS server in the building which has a record for bob.office.com to resolve to 192.168.0.145 (the internal address for my Fedora Server)

However now that I have created my Virtual Hosts I get 403 errors every time I visit bob.office.com.

<h1>Forbidden</h1>
<p>You don't have permission to access /
on this server.</p>
<p>Additionally, a 403 Forbidden
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache/2.2.0 (Fedora) Server at bob.office.com Port 80</address>

Can anyone point me in the right direction??? I created the folder /home/tom/public_html as user tom and tried as root also but still 403 errors.

Thanks in advance guys.

platd
26th June 2006, 18:22
Have you setup a virtual host section for the default host ?
Do the other virtual hosts work ?
What does ErrorLog /home/tom/logs/bob.office.com say if any thing.
I think you may need an Allow directive for the newer version of apache for that directory.
I am a bit rusty with apache since moving to lighttpd

Good luck

tommywds
26th June 2006, 18:27
Hi

turns out I needed to change the permissions on the tom folder
Works a treat now :)

Thanks for you help!

vlsimpson
27th June 2006, 08:09
Hi

turns out I needed to change the permissions on the tom folder
Works a treat now :)

Thanks for you help!

403 Forbidden's are almost always filesystem permission problems.