Topic: Apache2 VirtualHost Block -> ProxyPass fastcgi PHP-FPM + sub-directory
Apache2 VirtualHost Block -> ProxyPass fastcgi PHP-FPM + sub-directory w/ different ProxyPass ... how?
It seems like I have tried everything that I could think of. I tried putting a sub directory Directory directive in, with a secondary Proxy Pass, with no luck.
ProxyPass fcgi://127.0.0.1:9071/home/exampledomain/public_html$1 (PHP 7.1.2)
ProxyPass fcgi://127.0.0.1:9056/home/exampledomain/public_html$1 (PHP 5.6)
I need to use PHP 5.6 on a sub directory. Does anyone know how I can achieve this?
# VIRTUAL SERVER #
# TLD: exampledomain.com #
# Username: exampledomain #
# SSL #
<VirtualHost 10.1.1.100:443>
ServerName exampledomain.com
ServerAlias exampledomain.com
DocumentRoot /home/exampledomain/public_html
ErrorLog /home/exampledomain/exampledomain.com_ssl_error_log
CustomLog /home/exampledomain/exampledomain.com_ssl_access_log combined
ScriptAlias /cgi-bin/ /home/exampledomain/cgi-bin/
DirectoryIndex index.html index.php index.php4 index.php5 index.htm
<Directory /home/exampledomain/public_html>
Options -Indexes +FollowSymlinks
#allow from all
#AllowOverride None Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Directory>
<Directory /home/exampledomain/cgi-bin>
#allow from all
#AllowOverride None Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =www.exampledomain.com
RewriteRule ^(.*) https://exampledomain.com/ [R]
SSLEngine on
SSLCertificateFile /home/exampledomain/ssl.cert
SSLCertificateKeyFile /home/exampledomain/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
php_value memory_limit 64M
php_value suhosin.session.encrypt Off
<LocationMatch ^(.*\.php)$>
ProxyPass fcgi://127.0.0.1:9071/home/exampledomain/public_html$1
</LocationMatch>
</VirtualHost>
Thanks in advance!