macro fixes
This commit is contained in:
parent
3cad8c12c6
commit
dc11608f1b
|
@ -1,50 +0,0 @@
|
|||
# VHostHTTP for http only
|
||||
# VHostHTTPS for http & https w/ optional http to https redirect
|
||||
# only use one of the above at at time
|
||||
# VHostMAIL for webmail at mail. subdomain assumes/requires https w/ valid cert
|
||||
|
||||
# VHostHTTP - HTTP on Port 80. Includes ServerAlias for .mylampsite.com subdomain
|
||||
<Macro VHostHTTP $vhost>
|
||||
<VirtualHost *:80>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
DocumentRoot /srv/www/$vhost/html
|
||||
</VirtualHost>
|
||||
</Macro>
|
||||
|
||||
# VHostHTTPS - HTTPS on Port 443. Inludes Port 80 and ServerAliases for .mylampsite.com subdomain
|
||||
<Macro VHostHTTPS $vhost>
|
||||
<VirtualHost *:80>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
<Location "/">
|
||||
<If "%{REQUEST_URI} !~ m#^/.well-known/acme-challenge/#">
|
||||
Redirect 301 "https://%{HTTP_HOST}%{REQUEST_URI}"
|
||||
</If>
|
||||
</Location>
|
||||
</VirtualHost>
|
||||
<VirtualHost *:443>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
DocumentRoot /srv/www/$vhost/html
|
||||
SSLCertificateFile /etc/ssl/letsencrypt/$vhost.pem
|
||||
</VirtualHost>
|
||||
</Macro>
|
||||
|
||||
# Webmail - HTTP Port 80 Redirects to HTTPS Port 443
|
||||
<Macro VHostMAIL $vhost>
|
||||
<VirtualHost *:80>
|
||||
ServerName mail.$vhost
|
||||
<If "%{REQUEST_URI} !~ m#^/.well-known/acme-challenge/#">
|
||||
Redirect / https://mail.$vhost
|
||||
</If>
|
||||
</VirtualHost>
|
||||
<VirtualHost *:443>
|
||||
ServerName mail.$vhost
|
||||
DocumentRoot /srv/www/html/webmail/
|
||||
SSLCertificateFile /etc/ssl/letsencrypt/mail.$vhost.pem
|
||||
</VirtualHost>
|
||||
</Macro>
|
|
@ -17,12 +17,12 @@
|
|||
# VHostAliasHTTPSVarnish for http & https
|
||||
# *only use one of the Alias options above at at time*
|
||||
|
||||
# VHostHTTP - HTTP on Port 80. Includes ServerAlias for .mylampsite.com subdomain
|
||||
# VHostHTTP - HTTP on Port 80. Includes ServerAlias for .example.com subdomain
|
||||
<Macro VHostHTTP $vhost $username>
|
||||
<VirtualHost *:80>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
DocumentRoot /srv/www/$vhost/html
|
||||
<FilesMatch ".+\.ph(ar|p|tml)$">
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-$username.sock|fcgi://localhost"
|
||||
|
@ -33,7 +33,7 @@
|
|||
<Macro VHostSubdomainHTTP $vhost $username $subdomain>
|
||||
<VirtualHost *:80>
|
||||
ServerName $subdomain.$vhost
|
||||
ServerAlias $subdomain.$vhost.mylampsite.com
|
||||
ServerAlias $subdomain.$vhost.example.com
|
||||
DocumentRoot /srv/www/$vhost/$subdomain
|
||||
<FilesMatch ".+\.ph(ar|p|tml)$">
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-$username.sock|fcgi://localhost"
|
||||
|
@ -41,12 +41,12 @@
|
|||
</VirtualHost>
|
||||
</Macro>
|
||||
|
||||
# VHostHTTPS - HTTPS on Port 443. Inludes Port 80 and ServerAliases for .mylampsite.com subdomain
|
||||
# VHostHTTPS - HTTPS on Port 443. Inludes Port 80 and ServerAliases for .example.com subdomain
|
||||
<Macro VHostHTTPS $vhost $username>
|
||||
<VirtualHost *:80>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
DocumentRoot /srv/www/$vhost/html
|
||||
## <Location "/">
|
||||
## <If "%{REQUEST_URI} !~ m#^/.well-known/acme-challenge/#">
|
||||
|
@ -60,7 +60,7 @@
|
|||
<VirtualHost *:443>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
DocumentRoot /srv/www/$vhost/html
|
||||
<FilesMatch ".+\.ph(ar|p|tml)$">
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-$username.sock|fcgi://localhost"
|
||||
|
@ -70,11 +70,11 @@
|
|||
</VirtualHost>
|
||||
</Macro>
|
||||
|
||||
# VHostSubdomainHTTPS - HTTPS on Port 443. Inludes Port 80 and ServerAliases for .mylampsite.com subdomain
|
||||
# VHostSubdomainHTTPS - HTTPS on Port 443. Inludes Port 80 and ServerAliases for .example.com subdomain
|
||||
<Macro VHostSubdomainHTTPS $vhost $username $subdomain>
|
||||
<VirtualHost *:80>
|
||||
ServerName $subdomain.$vhost
|
||||
ServerAlias $subdomain.$vhost.mylampsite.com
|
||||
ServerAlias $subdomain.$vhost.example.com
|
||||
DocumentRoot /srv/www/$vhost/$subdomain
|
||||
## <Location "/">
|
||||
## <If "%{REQUEST_URI} !~ m#^/.well-known/acme-challenge/#">
|
||||
|
@ -87,7 +87,7 @@
|
|||
</VirtualHost>
|
||||
<VirtualHost *:443>
|
||||
ServerName $subdomain.$vhost
|
||||
ServerAlias $subdomain.$vhost.mylampsite.com
|
||||
ServerAlias $subdomain.$vhost.example.com
|
||||
DocumentRoot /srv/www/$vhost/$subdomain
|
||||
<FilesMatch ".+\.ph(ar|p|tml)$">
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-$username.sock|fcgi://localhost"
|
||||
|
@ -102,7 +102,7 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
DocumentRoot /srv/www/$vhost/html
|
||||
<FilesMatch ".+\.ph(ar|p|tml)$">
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-$username.sock|fcgi://localhost"
|
||||
|
@ -111,7 +111,7 @@
|
|||
<VirtualHost *:443>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
RequestHeader set X-Forwarded-Proto https
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://127.0.0.1:6081/
|
||||
|
@ -125,7 +125,7 @@
|
|||
<Macro VHostSubdomainHTTPSVarnish $vhost $username $subdomain>
|
||||
<VirtualHost *:80>
|
||||
ServerName $subdomain.$vhost
|
||||
ServerAlias $subdomain.$vhost.mylampsite.com
|
||||
ServerAlias $subdomain.$vhost.example.com
|
||||
DocumentRoot /srv/www/$vhost/$subdomain
|
||||
<FilesMatch ".+\.ph(ar|p|tml)$">
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-$username.sock|fcgi://localhost"
|
||||
|
@ -133,7 +133,7 @@
|
|||
</VirtualHost>
|
||||
<VirtualHost *:443>
|
||||
ServerName $subdomain.$vhost
|
||||
ServerAlias $subdomain.$vhost.mylampsite.com
|
||||
ServerAlias $subdomain.$vhost.example.com
|
||||
RequestHeader set X-Forwarded-Proto https
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://127.0.0.1:6081/
|
||||
|
@ -165,7 +165,7 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
<Location "/">
|
||||
<If "%{REQUEST_URI} !~ m#^/.well-known/acme-challenge/#">
|
||||
Redirect 301 "$redirect%{REQUEST_URI}"
|
||||
|
@ -178,7 +178,7 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
<Location "/">
|
||||
<If "%{REQUEST_URI} !~ m#^/.well-known/acme-challenge/#">
|
||||
Redirect 301 "$redirect%{REQUEST_URI}"
|
||||
|
@ -188,7 +188,7 @@
|
|||
<VirtualHost *:443>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
<Location "/">
|
||||
<If "%{REQUEST_URI} !~ m#^/.well-known/acme-challenge/#">
|
||||
Redirect 301 "$redirect%{REQUEST_URI}"
|
||||
|
@ -203,7 +203,7 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
DocumentRoot /srv/www/$alias/html
|
||||
<FilesMatch ".+\.ph(ar|p|tml)$">
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-$username.sock|fcgi://localhost"
|
||||
|
@ -215,7 +215,7 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
DocumentRoot /srv/www/$alias/html
|
||||
## <Location "/">
|
||||
## <If "%{REQUEST_URI} !~ m#^/.well-known/acme-challenge/#">
|
||||
|
@ -229,7 +229,7 @@
|
|||
<VirtualHost *:443>
|
||||
ServerName $vhost
|
||||
ServerAlias www.$vhost
|
||||
ServerAlias $vhost.mylampsite.com
|
||||
ServerAlias $vhost.example.com
|
||||
DocumentRoot /srv/www/$alias/html
|
||||
<FilesMatch ".+\.ph(ar|p|tml)$">
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-$username.sock|fcgi://localhost"
|
||||
|
|
Loading…
Reference in New Issue
Block a user