All checks were successful
Cloud Apache Container / Build-and-Push (74) (push) Successful in 2m21s
Cloud Apache Container / Build-and-Push (80) (push) Successful in 1m21s
Cloud Apache Container / Build-and-Push (81) (push) Successful in 1m18s
Cloud Apache Container / Build-and-Push (82) (push) Successful in 2m24s
Cloud Apache Container / Build-and-Push (83) (push) Successful in 1m54s
Cloud Apache Container / Build-and-Push (84) (push) Successful in 1m20s
Cloud Apache Container / Build-and-Push (85) (push) Successful in 1m18s
Cloud Apache Container / Build-FPM-Images (74) (push) Successful in 1m16s
Cloud Apache Container / Build-FPM-Images (80) (push) Successful in 2m16s
Cloud Apache Container / Build-FPM-Images (81) (push) Successful in 2m17s
Cloud Apache Container / Build-FPM-Images (82) (push) Successful in 1m15s
Cloud Apache Container / Build-FPM-Images (83) (push) Successful in 1m15s
Cloud Apache Container / Build-FPM-Images (84) (push) Successful in 2m9s
Cloud Apache Container / Build-FPM-Images (85) (push) Successful in 2m5s
Cloud Apache Container / Build-Shared-httpd (push) Successful in 27s
Reverts from ProxyPassMatch back to SetHandler + ProxyFCGISetEnvIf.
ProxyPassMatch couldn't override DOCUMENT_ROOT (Apache sets it as a
CGI param after all directives run). SetHandler with unconditional
ProxyFCGISetEnvIf correctly overrides both:
- DOCUMENT_ROOT: set to /home/{user}/public_html (FPM path)
- SCRIPT_FILENAME: constructed from DOCUMENT_ROOT + SCRIPT_NAME
This fixes WordFence WAF and other plugins that use DOCUMENT_ROOT to
locate config/log files. Tested on live sites with WordPress pretty
URLs, wp-admin, static assets, and WordFence WAF optimization.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
48 lines
1.6 KiB
Smarty
48 lines
1.6 KiB
Smarty
<Directory "/mnt/users/~~user~~/~~domain~~">
|
|
AllowOverride None
|
|
Require all granted
|
|
</Directory>
|
|
|
|
<Directory "/mnt/users/~~user~~/~~domain~~/public_html">
|
|
Options All MultiViews
|
|
AllowOverride All
|
|
Require all granted
|
|
</Directory>
|
|
|
|
<VirtualHost *:80>
|
|
ServerName "~~domain~~"
|
|
~~alias_block~~
|
|
DocumentRoot "/mnt/users/~~user~~/~~domain~~/public_html"
|
|
RewriteEngine on
|
|
RewriteCond %{SERVER_NAME} =~~domain~~
|
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
|
</VirtualHost>
|
|
|
|
<IfModule mod_ssl.c>
|
|
<VirtualHost *:443>
|
|
ServerName "~~domain~~"
|
|
~~alias_block~~
|
|
DocumentRoot "/mnt/users/~~user~~/~~domain~~/public_html"
|
|
|
|
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
|
|
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
|
|
|
|
<FilesMatch \.php$>
|
|
SetHandler "proxy:fcgi://~~fpm_host~~:~~fpm_port~~"
|
|
</FilesMatch>
|
|
|
|
# The shared httpd serves files from /mnt/users/{user}/{domain}/public_html
|
|
# but the FPM container has them at /home/{user}/public_html.
|
|
# Override both DOCUMENT_ROOT and SCRIPT_FILENAME so PHP sees the
|
|
# correct paths (required for plugins like WordFence that use
|
|
# $_SERVER['DOCUMENT_ROOT'] to locate config files).
|
|
ProxyFCGISetEnvIf "true" DOCUMENT_ROOT "/home/~~user~~/public_html"
|
|
ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "/home/~~user~~/public_html%{reqenv:SCRIPT_NAME}"
|
|
|
|
DirectoryIndex index.php index.html index.htm
|
|
|
|
ErrorLog "/var/log/httpd/~~domain~~-error.log"
|
|
CustomLog "/var/log/httpd/~~domain~~-access.log" combined
|
|
</VirtualHost>
|
|
</IfModule>
|