I have the following Apache configuration:
ServerName localhost
UseCanonicalName Off
LogLevel debug
<VirtualHost *:8080>
ServerName _default_
VirtualDocumentRoot /Users/alex/Sites/op3/cms/account/%-2/domain/%-3+/webroot
DirectoryIndex index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L,PT]
LogLevel rewrite:trace6
LogLevel proxy:trace6
ProxyPassMatch ^/(.+\.php)(\?.*)?$ fcgi://127.0.0.1:9000/Users/alex/Sites/op3/cms/$1$2
<Directory /Users/alex/Sites/op3/cms>
Options +Indexes
Require all granted
</Directory>
</VirtualHost>
The path in ProxyPassMatch
is not correct, but I'm not sure how I should be constructing the path. Using the same %-2
and %-3+
tokens in ProxyPassMatch does not appear to work. I have attempted to use another solution I found, but this was the best I could come up with:
ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/var/run/php5-fpm.sock|fcgi://localhost:9000/Users/alex/Sites/op3/cms/account/%-2/domain/%-3+/webroot/$1
...and this didn't work either.
Any ideas?