%0 is not replaced by server name when used with Apache's ProxyPassMatch

本秂侑毒 提交于 2019-12-04 11:25:28

I'm using this configuration with Apache 2.4:

<VirtualHost *:8080>
    UseCanonicalName Off
    VirtualDocumentRoot "/usr/local/apache/vhosts/%0"

    RewriteEngine On
    RewriteRule ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:19054/usr/local/apache/vhosts/%{SERVER_NAME}/$1 [P]
</VirtualHost>

vhosts directory contains directories with domain names that Apache will dynamically match to each request. All PHP files are then matched and their requests are forwarded to PHP FPM process listening at 127.0.0.1:19054.

This configuration works with further rewrite rules defined inside virtual hosts directories.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!