PHP-FPM 和 ProxyPass 是否禁用了使用 FilesMatch 的可能性?

PHP-FPM 和 ProxyPass 是否禁用了使用 FilesMatch 的可能性?

我使用 PHP-FPM 和 mod_proxy_fcgi 来提供 PHP 文件。系统运行速度极快,运行完美,只是我无法使用 Apache 中的 FilesMatch 指令。这很有道理,因为 proxypass 被定义为接管任何 php 文件。

有没有什么办法可以让 FilesMatch 正常工作?

答案1

我放弃了,因为这是不可能的。所以我停止使用 ProxPass,并采用了这个解决方案:

http://www.sysadminslife.com/linux/howto-apache-mit-php-fpm-und-mod-fastcgi-unter-debian-wheezy/

答案2

我想你还没找到答案吧?我正在考虑做这样的事情:

<Proxy *>
    Require all granted
</Proxy>
<Location />
    ProxyPass fcgi://127.0.0.1:9000/
    ProxyPassReverse fcgi://127.0.0.1:9000/
</Location>
<Location /static>
    ProxyPass !
</Location>

但是我还没有测试过。这需要所有静态资产都从目录中提供/static

相关内容