TomcaT Posted November 1, 2005 Share Posted November 1, 2005 Hi Guys,I am really new to this Apache server stuff and am stuck.I have a Apache webserver up and running, I am trying to make a directory on the server NOT list the index of files if there is no index.htm or index.html or index.php etc in the directory.I looked on google and found a website that said this is what I needed to change in my httpd.conf:## This may also be "None", "All", or any combination of "Indexes",# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".## Note that "MultiViews" must be named *explicitly* --- "Options All"# doesn't give it to you.# Options Indexes FollowSymLinks MultiViewsIt stated that I should remove Indexes from the Options line, however I made this change by taking the Indexes out, restarted the server but when I type in http://www.mydomain.com/images/ the browser still lists the contents of the directory, I know I could just put a blank index.htm file in but wondered if there was a better way using the server configuration?Any advice appreciated.Cheers.TC Link to comment Share on other sites More sharing options...
sven Posted November 1, 2005 Share Posted November 1, 2005 i do the simple blank index.html file. its actualy not blank, it says access denied lol. Works for me. you could also just redirect them to the front page using .htaccess (if possible) or just with html Link to comment Share on other sites More sharing options...
aresgodofwar Posted November 2, 2005 Share Posted November 2, 2005 In the section that says <Directory "/var/www/html"> Options Indexes Includes FollowSymLinks AllowOverride all Allow from all Order allow,deny</Directory>remove Indexes so that you see this:<Directory "/var/www/html"> Options Includes FollowSymLinks AllowOverride all Allow from all Order allow,deny</Directory>then save the httpd.conf and restart the services. i tested on my apache server and it worked. when you have indexes turned off, apache auto generates an error page saying you don't have access. when turned on, it shows the index of the files in the directory. Link to comment Share on other sites More sharing options...
TomcaT Posted November 3, 2005 Author Share Posted November 3, 2005 Thank you for your help Ares, this worked exactly as stated..... thanks also for the input Sven.TC Link to comment Share on other sites More sharing options...
aresgodofwar Posted November 3, 2005 Share Posted November 3, 2005 i'm glad you got it working. have fun with apache, it's a great web server. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now