Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beginner - Forbidden subdirectories

Status
Not open for further replies.

MrPhreaker

Programmer
Jun 20, 2003
19
0
0
GB
Hi all

I have installed Apache web server as part of an Oracle installation and I was hoping to run a private website as well as do the usual Oracle stuff.

My question though is that unlike PHPTriad, I am struggling to migrate my web site to this application.

The problem I have is that when I attempt to access


it does not display anything in the dir but returns a forbidden error yet if I type:



Then it returns the file with no problems.



Please advise.




Thanks



Mr P
 
Hiya

Sorry for the dumb Q but I am expecting it to list all the files in the directory. Very crude I know but it does the job. In dir2 for example I have a couple of movies, a few pics and a text file.

Normally if there is no index.html page in the directory it lists all the files.

I hope this makes sense.


Thanks



Mr P
 
There are two ways to do this.

1) change the way Apache treats every folder
2) change the way Apache treats the specific folders you want to have automated indexes, leave the other folders the way they were. This option is more secure.

I am sure you can figure out how to setup option 1 after I explain you option 2, and I wouldn't want you to have a very compromisable system in which every single folder is indexing so I'll just explain option 2.

- Look in your httpd.conf for the word "AllowOverride" inside the <Directory "<DocumentRoot>"> you set up.
Make sure AllowOverride either lists "Options" ór the word "All"

- make a file called ".htaccess" in which you put the text
"Options Indexes"

-place this file in the directory you want to have a listing =). Be careful ! These settings propagate downwards the directory tree by default. By making a .htaccess with
"Options -Indexes" you can disable the indexing option for a specific folder.

or mail me kib.at.kibje.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top