Web Hosting Talk







View Full Version : apache 403 help please/


dasource
06-20-2001, 04:54 PM
I have been trying for days to get apache to work, but I keep on getting 403 error message.

The main document root for my server is /var/www/html
if the domain is pointing to this directory all is ok.

but..... when I change the document root to for example /home/sites/site1/www the servers keeps on giving 403s please could someone advise as to what I need to do or what is going wrong.

Are there special setting to the dir? like chmod 755

What about the user does he need specific access like 711. If so how do I change that?

Do I need to have a .htaccess in the directory or not?

Thanks

Planet Z
06-20-2001, 06:50 PM
The directory should probably be at least 744.

If you want to execute CGI in it, it should be 755.

This isn't the most secure way of doing things, but it is the simplest to get started.

dasource
06-20-2001, 07:11 PM
Is there something wrong with this?

<VirtualHost *.*.*.*>
ServerName www.myhost.net
ServerAdmin user
DocumentRoot /home/sites/www/myhost.net
ServerAlias myhost.net
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
# AddHandler chiliasp .asp
# AddHandler chiliasp .asa
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
Options ExecCGI Includes IncludesNOEXEC Indexes MultiViews
ServerSignature Email
<Directory "/home/sites/www/myhost.net">
</Directory>
</VirtualHost>

Please advise

eriky
06-20-2001, 07:24 PM
Hi, I'm not sure but maybe you need to change the owner of those directories.
403 is a forbidden message.
On my server the owner of the site1, site2 etc dirs is 'nobody' (apache runs a nobody too)
You can change that with the chown command

dasource
06-20-2001, 08:34 PM
I got it to work now thanks.

eriky
06-21-2001, 05:57 AM
Was it the owner problem?

kunal
06-21-2001, 02:04 PM
i think he must have chmoded the public_html dir, but not the user directory...


im presuming this offcourse :)

dasource
06-21-2001, 04:37 PM
kunal, you hit the nail on the head my friend.

thanks for your advise ppl.