We help IT Professionals succeed at work.

403 forbidden

shopno
shopno asked
on
Forbidden
You don't have permission to access / on this server.

Apache/1.3.20 Server at ____.com Port 80

This is the error that I am getting when I try to access my web site. I only have apache and under it i have htdocs. How do I enable the index.html page so that everybody can read it? Is the folder permissions? Apache folder has drwxr-xr-x and htdocs is drwxr-xr-x.
Comment
Watch Question

Run Apache as daemon not from inetd!

Locate the config files for apache.

normaly:
   /etc/apache/

if it isn't there type:
   find / -name "httpd.conf"

Edit the file httpd.conf
make sure it contains the following 2 lines:
   User www-data
   Group www-data

set the group and owner www-data on the htdocs dir and files type:
   chown -R www-data.www-data htdocs
And...

set Documentroot directive in the srm.conf file or if you don't have srm.conf in the httpd.conf. like:

DocumentRoot /your-apache-path/htdoc

Commented:
Remember to enable the default document in your httpd.conf (usually in /etc/httpd/conf/httpd.conf) and add a line like:

DirectoryIndex index.html index.php index.htm
Also, assure you have your DocumentRoot set correctly
DocumentRoot /home/httpd/htdocs

(then reload apache with something like #killall -HUP httpd)

You can also test your site using the whole URL
http://yoursite.com/index.html

Your permissions looks ok.

Alejandro,-

Commented:
and the index.html page needs to go into the htdocs directory, the message also appears if there is no page at all and the directory listing is denied. Make sure the index page is set a+r

Explore More ContentExplore courses, solutions, and other research materials related to this topic.