PDA

View Full Version : Newbie Apache Virtual Host questions


benbroad
27th October 2004, 11:41 AM
Hey everyone,
I am VERY new to Linux. I have built a box to teach myself as much as I can. I have installed Fedora Core 2, Webmin and have Apache running.

I have a domain name pointing to my static IP address. My router forwards all port 80 traffic to my Linux box. I have set up a virtual server with the following directives:

DocumnetRoot /var/www/benbroadhurst.com/httpdocs/
ServerName www.benbroadhurst.com
<Directory "/var/www/benbroadhurst.com/httpdocs/">
allow from all
Options +Indexes
</Directory>

When I go to www.benbroadhurst.com I get an error 403 "You don't have permission to access /index.html on this server"

I get the same error if I try http://192.168.8.30 which is the internal IP for the Fedora Box even though I have a default virtual server set up.

I know I am missing something incredibly obvious but Im afraid until now I have been a Windows boy. If anyone could point me in the right direction, I would apreciate it.

Many thanks,
Ben.

johnnyq
28th October 2004, 04:57 AM
benbroad, this sounds like a permissions problem try setting rwxr-xr-x on /var/www/benbroadhurst.com/httpdocs/ and see if that works and then try it, hopefully this works

benbroad
28th October 2004, 01:08 PM

I thought the same thing but its a 755 directory - that is rwxr-xr-w isn't it?

benbroad
28th October 2004, 01:10 PM
Is it something to do with the user a visitor would be assigned? I dunno, Im really scratching around here and getting very frustrated into the bargain.

Jman
28th October 2004, 10:05 PM
I thought the same thing but its a 755 directory - that is rwxr-xr-w isn't it?
Close: 755 is rwxr-xr-x.

What helps is if the apache user owns this file. Run chown apache:apache index.html

Look at the error logs in /var/log/httpd for clues.

johnnyq
28th October 2004, 10:24 PM
<Directory "/var/www/benbroadhurst.com/httpdocs/">
allow from all
Options +Indexes
</Directory>

this doesnt look right to me, try replacing the top part with the bottom one

<Directory "/var/www/benbroadhurst.com/httpdocs">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>