Click to See Complete Forum and Search --> : Apache + Redhat 8.0 = No Love


szero
02-10-2003, 06:41 PM
Hey...I have Redhat 8.0.

I ""upgraded"" from slackware because I wanted hardware acceleration (I can't get my video card drivers to work flawlessly with anything but Redhat). Now, Apache worked perfectly on slackware. Just move a file to /var/www/htdocs/ and its there. Now in redhat...when i move a file to /var/www/html/...and i try to show a file index...it shows me the test page and says "replace this with your own index.html" So, I renamed the noindex.htm file hoping it would make the file index work..but it just doesn't. I don't want an index file! I want it to show a file index. Wtf is going on?? If you need any additional details just ask.

Seminole
02-10-2003, 07:29 PM
Find this section in httpd.conf


#
# Disable autoindex for the root directory, and present a
# default Welcome page if no other index page is present.
#
<LocationMatch "^/$>
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>


Comment out the lines like so

#
# Disable autoindex for the root directory, and present a
# default Welcome page if no other index page is present.
#
#<LocationMatch "^/$>
# Options -Indexes
# ErrorDocument 403 /error/noindex.html
#</LocationMatch>


Save the file.

Go into your html directory and get rid of your index file.

Run this command
>service httpd restart

Refresh your locahost directory in your browser.

You will now have a directory tree with your files and folders listed.


If you leave your index file in there after the changes it will still display.
If you leave those lines intact then the index file will display if present and if not, you will get the default greeting.

REMEMBER to restart httpd after changing httpd.conf

Sem

szero
02-10-2003, 07:47 PM
YOU ARE MY SAVIOR. THANK YOU SO MUCH!!!

Seminole
02-10-2003, 07:54 PM
No problem. I've never really thought about doing that but I guess it's a necessary evil if you want to have directory browsing.

It's good cause an index file will still block up the directory to protect files so I guess it's not all bad.

I just figured it out after reading your post. I'm learning all this apache stuff too. It was something I just needed to know after reading your post (cause it's so easy to do on IIS).

Thanks for the inspiration. :)