Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Gentoo, Kubuntu, formerly LFS, SuSE, and RedHat
Posts: 133
Rep:
Apache won't default to index.html
I modified my httpd.conf file a while ago in order to install phpBB2, and I have recently found that Apache was sending the directory listing for all folders, even those that have index.html in them.
The rest of the file can be found here
As far as I can tell that's the only part of the httpd.conf that makes any difference. The .conf file was originally made with Redhat Apache Config but I have modified it by hand since then.
When I get the root directory of the server it pretends that the index.html file isn't there. I know I have it capitalized right, but it doesn't work and instead gives me the RedHat "no index found" page. If I do that in other directores with an index.html file in them I get the directory listing.
It seems that you only declare a DirectoryIndex for the virtual parts, not a global one.
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex
Distribution: Gentoo, Kubuntu, formerly LFS, SuSE, and RedHat
Posts: 133
Original Poster
Rep:
/etc/init.d/httpd restart
Thanks. It worked!
I don't know why redhat-httpd-conf didn't make the file right, maybe I didn't know what I was doing while using the tool, but anyway it works now. It's helpful to know that Apache must be restarted for changes to take effect. I had had some major problems with that earlier where I had no idea why it wasn't working. I guess I'm used to Samba, which re-applys the settings every few minutes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.