我有一个简单的Apache2.4和PHP-FPM设置,我正在尝试启用+ Indexes选项,但我得到404"找不到文件".尝试访问没有索引文件的文件夹时,即使启用了autoindex也是如此.
这是我的vhost的一部分:
#php
ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/var/run/fpm/fatal.sock|fcgi://
#super public directory with Indexes!
<Location /pub>
Options +Indexes
IndexOptions +FancyIndexing
</Location>
Run Code Online (Sandbox Code Playgroud)
当我尝试访问http://domain.com/pub/时,我希望看到我放在那里的文件列表,但我收到错误404 Not Found.
我想知道它来自何处,因为ProxyPassMatch不应转发请求,因为查询中没有.php,所以接下来是目录索引,它查找不存在的index.php(404),但为什么mod_autoindex不起作用?
当我删除ProxyPassMatch行时,autoindex工作正常,我看到列出的文件夹内容.有任何想法吗?