If an index.html or index.php file is not in an htdocs directory, I want to restrict the user from viewing the files in the directory. Any tutorials or scripts on that?
I am new to apache configuration process, I would be happy if someone can point to a tutorial which starts with basics and covers most of the topics with examples.
Thanks
how to restrict directory listing in apache
Moderator: General Moderators
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
.htaccess
More info: http://httpd.apache.org/docs/1.3/mod/mod_autoindex.html
Code: Select all
IndexIgnore */*- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
I have not read about this option and it says that this line has to be added in .htaccess file. I do not have a .htaccess file in my apache directory and its sub-directories. Is .htaccess different from httpd.conf file, if so, then where should I put the new .htacess file.
Please bear with my ignorance in the issue.
Please bear with my ignorance in the issue.
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
I have put the same line in httpd, it displays the following thus blocking access
How can I make the Apache to display, 'Access is forbidden' in a separate page because I have seen this possible elsewhere?
Code: Select all
Index of /temp
Icon Name Last modified Size Description
Apache/2.0.55 (Win32) PHP/5.1.2 Server at 82.x.x.x Port 8080