Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've searched far and wide and am unable to figure out what is messing up my configuration. I'm running on Arch x86_64 if that helps anyone.

Short version

I've enabled Option Indexes, restarted Apache and I get back a 404 page not found when trying to get a directory listing for a folder. Disabling dir_module doesn't help, and I don't want to use user_dirs module. If I type in the full path, the files render (.log files).

Details

Apache is running fine (I've got other directories running properly). When I try to share a directory whose contents I want listed via autoindex, I get back a 404 page not found. Apache's logs only show cache misses and 404's trying to hit the alias defined below. My main httpd.conf has:

LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
...
<Directory "/srv/http">
   Options Indexes FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>

<IfModule dir_module>
   DirectoryIndex index.html index.php
</IfModule>
...
Include conf/extra/httpd-test-dir.conf

In http-test-dir.conf I have:

Alias /test_dir /home/user/dir
<Directory "/home/user/dir">
   AllowOverride All
   Options Indexes FollowSymLinks MultiViews
   IndexOptions FancyIndexing
   Order allow,deny
   Allow from all
</Directory>

I've tried commenting out the dir_module lines and restarting apache with no luck. I can get to the files in /home/user/dir/ manually via:

http://hostname/test_dir/2012-04-06/result.log

Unfortunately the folder paths change so I can't hard code them and I don't want to use user_dirs module. I checked permissions and all files/folders from / to /home/user/dir/ are

drwxr-xr-x

Any help would be greatly appreciated. Thanks.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Figured it out!!!

Turns out it was Passenger module running (for one of my other sites). I had to modify http-test-dir.conf as follows:

Alias /test_dir /home/user/dir
<Directory "/home/user/dir">
   AllowOverrid All
   Options Indexes FollowSymLinks MultiViews
   IndexOptions FanciyIndexing
   PassengerEnabled off  <------Added this line
   Order allow,deny
   Allow from all
</Directory>

Hopefully this will help someone else who is running Rails applications. In my case it was GitLab.

share|improve this answer
    
Glad you figured it out! Please mark this as a correct answer. –  Andrew M. Apr 7 '12 at 0:28
    
Yeah I had to wait a few days. It wouldn't let me set it as the correct answer right away. –  sbtkd85 Apr 13 '12 at 13:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.