2026-04-01 10:08:00 -07:00
|
|
|
<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>
|
|
|
|
|
|
2026-04-01 12:22:53 -07:00
|
|
|
# Rewrite SCRIPT_FILENAME for PHP-FPM: the shared httpd serves from
|
|
|
|
|
# /mnt/users/{user}/{domain}/public_html but the FPM container has
|
|
|
|
|
# files at /home/{user}/public_html. Replace the base path so FPM
|
|
|
|
|
# can find the PHP files at its local mount point.
|
|
|
|
|
ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "expr=%{reqenv:SCRIPT_FILENAME} =~ s|/mnt/users/~~user~~/~~domain~~/public_html|/home/~~user~~/public_html|"
|
|
|
|
|
|
2026-04-01 10:08:00 -07:00
|
|
|
DirectoryIndex index.php index.html index.htm
|
|
|
|
|
|
|
|
|
|
ErrorLog "/var/log/httpd/~~domain~~-error.log"
|
|
|
|
|
CustomLog "/var/log/httpd/~~domain~~-access.log" combined
|
|
|
|
|
</VirtualHost>
|
|
|
|
|
</IfModule>
|