在Apache2.2中启用目录列表

我search了很多,我无法弄清楚什么是搞乱我的configuration。 如果这有助于任何人,我正在Arch x86_64上运行。

简洁版本

我已经启用了选项索引,重新启动了Apache,并且当我试图获取一个文件夹的目录列表时,我找回了404页面。 禁用dir_module没有帮助,我不想使用user_dirs模块。 如果我input完整path,文件呈现(.log文件)。

细节

Apache运行正常(我有其他目录正常运行)。 当我尝试共享一个目录,其内容我想通过autoindex列出,我找回404页面找不到。 Apache的日志只显示caching未命中,404试图击中下面定义的别名。 我的主要httpd.conf有:

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 

在http-test-dir.conf中我有:

 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> 

我已经尝试注释掉dir_module行,并重新启动Apache没有运气。 我可以通过以下方式手动访问/ home / user / dir /中的文件:

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

不幸的是,文件夹path改变,所以我不能硬编码他们,我不想使用user_dirs模块。 我检查了从/到/ home / user / dir /的所有文件/文件夹的权限

 drwxr-xr-x 

任何帮助将不胜感激。 谢谢。

弄清楚了!!!

原来这是Passenger模块正在运行(为我的其他网站之一)。 我不得不修改http-test-dir.conf,如下所示:

 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> 

希望这会帮助运行Rails应用程序的其他人。 在我的情况下,它是GitLab。