Web Hosting Talk







View Full Version : httpd.conf


MikeF
01-18-2002, 10:48 PM
Hi,
in my apache httpd.conf at line 250 i have:

<Directory />
Options FollowSymLinks Indexes
AllowOverride All
</Directory>

At line 265 I have:

<Directory /home/httpd/docs>

#
# 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 Includes

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>

If i do not want any directories contents to be listed in the web browser do i change one of the above entries? If so which one and to what?

sodapopinski
01-18-2002, 11:51 PM
Options -Indexes

MikeF
01-19-2002, 12:00 AM
Originally posted by sodapopinski
Options -Indexes

Can you be more specific or complete with your answer. I am not experienced with editing the httpd.conf file.

Chicken
01-19-2002, 12:02 AM
I'm neeeearly positive that this would do what you want to do...

Originally posted by MikeF
Hi,
in my apache httpd.conf at line 250 i have:

<Directory />
Options FollowSymLinks Indexes
AllowOverride All
</Directory>

At line 265 I have:

<Directory /home/httpd/docs>

#
# 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 Includes

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>

If i do not want any directories contents to be listed in the web browser do i change one of the above entries? If so which one and to what?

MikeF
01-19-2002, 12:06 AM
Originally posted by Chicken
I'm neeeearly positive that this would do what you want to do...


Thank you sir, I guess i can give it a try and hope I dont get my feathers burned. :stickout

MikeF
01-19-2002, 08:52 AM
Originally posted by Chicken
I'm neeeearly positive that this would do what you want to do...



I havent tried this yet...why...because I am too CHICKEN :eek:
hee hee.

Before I make changes to the httpd.config I have been renaming the current working version on the webserver, ie., httpd.conf.bak. Then I edit the file on my local pc and ftp it to the correct directory. Can you tell me if this is a good process to follow?

For my information...is it very likely I can totally screw up the web server by editing the httpd.conf and restarting it if I have an error in the httpd.conf or is it just a matter of going back to the working version of the httpd.conf and restarting the webserver?

Skeptical
01-19-2002, 09:58 AM
Whenever you edit your httpd.conf you can test it by doing a:

/usr/sbin/httpd -t

If you have errors it'll tell you what it is and where the error occurred.

Btw Chicken that was correct.:D

MikeF
01-21-2002, 11:42 AM
Thanks everyone for helping me!

jahsh
01-21-2002, 09:00 PM
dont forget to restart apache after you change the httpd.conf
but im sure you already knew that:D