![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Browsing the Web the old-fashioned way | iBot | UNIX and Linux RSS News | 0 | 04-24-2008 01:50 AM |
| Squid Browsing problem | teenasuresh | Linux | 0 | 12-31-2007 01:54 AM |
| Thread browsing during search | tayyabq8 | Post Here to Contact Site Administrators and Moderators | 4 | 02-05-2007 05:46 AM |
| Change the root directory for apache, sshd and ftpd | Sergiu-IT | IP Networking | 3 | 07-05-2006 03:47 AM |
| Browsing Unix Source Code via the Web | Perderabo | News, Links, Events and Announcements | 0 | 12-16-2002 06:43 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
apache directory browsing
How do i prevent clients from browsing directory structures if there is no index.html in a directory?
For example, lets say that i dynamically create directories on in my doc root of an apache based web server. I know if i type the url and there is no index or default page in there, then apache will allow the browser to see all the files in that directory. I don't want this, I'd rather force a redirect or a 404 or anything but letting them see my document. Any ideas? System: FreeBSD 5.2.1 64-Bit www: apache 2
__________________
g_M_e |
| Forum Sponsor | ||
|
|
|
|||
|
hi
I could not understand you exactly. But I have some suggestion, hope helps..... 1 ) change the mode of your diresctory to 700 or 600 something that does not allow "other" user to see your directory content. This will show a "Forbidden" message on the browser screen. But, by the way you cannot list directory content even your docs! 2 ) edit your httpd.conf file (it must be under /usr/local/apache/con in FreeBSD, I am not sure!) and find the lines below <IfModule mod_dir.c> DirectoryIndex index.php index.html index.htm </IfModule> I your documents are in HTML or TXT format add the name of your file to the list and restart your server. <IfModule mod_dir.c> DirectoryIndex index.php index.html index.htm my_doc.html </IfModule> something/apache/bin/apachectl restart Now, your browser assumes that "my_doc.html" is an index page. Bye... |
|||
| Google The UNIX and Linux Forums |