如何停止ProxyPassMatch(mod_proxy)禁用目录列表(mod_autoindex)?

最近,我用fpm支持编译php 5.3.11,并且尽快使用apache

ProxyPassMatch "^/(.*\.php(/.*)?)$" "fcgi://127.0.0.1:9000/$1" DirectoryIndex index.html index.htm index.sthml welcome.html /index.php index.php 

它使PHP工作正常,但停止目录列表; 另一方面我有:

 <FilesMatch ".*\.php.*"> SetHandler "proxy:fcgi://127.0.0.1:9000/var/www/" DirectoryIndex index.html index.htm index.shtml welcome.html index.php /index.php Options +Indexes +Multiviews +Includes +FollowSymLinks </FilesMatch> 

它作为ProxyPassMatch反向工作,一切正常,但PHP断裂。

我有我的php-fpm.conf指令:listen = 127.0.0.1:9000

我试过了

listen = /var/run/php-fpm.sock

但是这一切都是一样的。

这是不是可以使用选项+索引+多视图+包括+ FollowSymLinks与ProxyPassMatch一起?

为什么不是我的FilesMatch指令工作? 我什至试图设置处理程序的完整path

相信我,我尝试了几乎所有使用谷歌,服务器故障和堆栈溢出!

谢谢你的帮助。

在Files / FilesMatch中,与索引相关的选项是没有意义的,它用于“目录”。

你应该尝试这样的:

 <Directory /path/to/documentroot> DirectoryIndex index.html index.htm index.shtml welcome.html index.php Options +Indexes +Multiviews +Includes +FollowSymLinks <FilesMatch \.php> SetHandler "proxy:fcgi://127.0.0.1:9000/var/www/" </FilesMatch> </Directory> 

注意:索引将显示目录列表。