you simply need in httpd.conf:
Options Indexes
for / directory
Main Topics
Browse All TopicsI've just installed apache, and if I put in
http://www.website.com/, it says "Forbidden", put if I put in http://www.website.com/ind
Also I have a directory called "htdocs" and within that is a file called "index.php". If I put in the browser:
http://www.website.com/htd
It comes back with "Page cannot be displayed" although the path is correct.
When I look in the error_log, nothing appears for the second statemant "/htdocs/index.php" but with the first error (http://www.website.com/")
Directory index forbidden by rule
What does mean, and what can I do to resolve it?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Ok,
http://www.website.com/ now works, but if I put in http://www.website.com/htd
For some reason, it will not allow me to use "htdocs/...". Why would this be?
Thanks
Choccarlm,
Yes, you cannot use /htdocs/index.php.
Does it work if you just use http://www.website.com/ind
Remember that /htdocs is just a folder in /usr/local/apache/, and if you notice there is a directive; somewhere in you httpd.conf (or look for that directive).
DocumentRoot /usr/local/apache/htdocs
This is to tell apache, evertyhing in this directory would be treated as the root (/) of your website. And any path under that folder would be another path in the URL.
cheers.
Samri
My Document root for this website is
/home/website/
htdocs is a folder within the webiste folder, so it does exist.
If I put in http://www.website.com/, it now works, as does
http://www.website.com/ind
I take it I cannot use htdocs as a folder name then?
M,
Hmm... I cannot recall htdocs being so special. Could you try to create another directory, maybe testdir and try to test.
Btw, do you have any files under htdocs? Is it possibble to access the file http://www.domain.com/htdo
cheers
My Document root for this website is
/home/website/
htdocs is a folder within the webiste folder, so it does exist.
If I put in http://www.website.com/, it now works, as does
http://www.website.com/ind
I take it I cannot use htdocs as a folder name then?
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area with the following recommendation for this question:
PAQ/Refund (questions not fully answered)
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
periwinkle
EE Cleanup Volunteer
Is there any way to have the Web users just type in www.website.com instead of www.website.com/ or www.website.com/index.html
This seems to work on my apache linux machine, but not on my apache windows 2000 machine.
Thanks for any help you can give me!
Lisa
hi Lisa,
>> Is there any way to have the Web users just type in www.website.com instead of www.website.com/ or www.website.com/index.html
This is among the popular Apache question.
One common solution is to fix the ServerName directive in you httpd.conf (or in the Vhost Container). Check Apace FAQ here : http://httpd.apache.org/do
Another thing is to check for DirectoryIndex directive. It's covered in mod_dir - http://httpd.apache.org/do
You may need to add
DirectoryIndex index.html index.htm
Hope this would help.
Business Accounts
Answer for Membership
by: samriPosted on 2002-07-04 at 20:08:45ID: 7130963
Choccarlm,
cs/misc/FA Q.html cs/misc/FA Q.html#for bidden cs/misc/FA Q.html#mal files
ocs/index. php should have been http://www.website.com/ind ex.php
1/, etc.
ex.php), look at DirectoryIndex directive. By default, I believe it is;
ocs/mod/mo d_dir.html ) loaded.
Forbidden is due to the default config for apache is to be quite restrictive. You would need to enable directory browsing to allow it.
Check apache FAQ:
http://httpd.apache.org/do
http://httpd.apache.org/do
http://httpd.apache.org/do
Please could you post the config portion that has
DocumentRoot directive.
Mine is on Win32, but it should be OK.
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
2nd part of the quesstion: http://www.website.com/htd
Remember that htdocs is a Root for your website (/), anything below that directory would have (/dir1, /dir2), and the url would be http://www.website.com/dir
If you want to have index.php to be your default directory index, ie, you would need to type only http://www.websites.com/ (and not http://www.website.com/ind
DirectoryIndex index.html
My example; the following would make the default indexfile to be index.cgi if it exist, next index.php, index.html, etc.
DirectoryIndex index.cgi index.php index.html index.htm index.html.var
You would need to have mod_dir (http://httpd.apache.org/d
I hope this help.
cheers.