File: //etc/apache2/sites-enabled/learn.cmaology.com.conf
<VirtualHost 158.220.100.248:80>
SuexecUserGroup #1009 #1009
ServerName learn.cmaology.com
ServerAlias www.learn.cmaology.com
ServerAlias mail.learn.cmaology.com
ServerAlias webmail.learn.cmaology.com
ServerAlias admin.learn.cmaology.com
DocumentRoot /home/cmaology/domains/learn.cmaology.com/public_html
ErrorLog /var/log/virtualmin/learn.cmaology.com_error_log
CustomLog /var/log/virtualmin/learn.cmaology.com_access_log combined
ScriptAlias /cgi-bin/ /home/cmaology/domains/learn.cmaology.com/cgi-bin/
DirectoryIndex index.php index.php4 index.php5 index.htm index.html
<Directory /home/cmaology/domains/learn.cmaology.com/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory /home/cmaology/domains/learn.cmaology.com/cgi-bin>
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
ProxyPass /.well-known !
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.learn.cmaology.com
RewriteRule ^/(?!.well-known)(.*)$ https://learn.cmaology.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.learn.cmaology.com
RewriteRule ^/(?!.well-known)(.*)$ https://learn.cmaology.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php8.1
RemoveHandler .php8.2
RemoveHandler .php8.4
<FilesMatch \.php$>
SetHandler proxy:unix:/run/php/17815071234503.sock|fcgi://127.0.0.1
</FilesMatch>
</VirtualHost>
<VirtualHost 158.220.100.248:443>
SuexecUserGroup #1009 #1009
ServerName learn.cmaology.com
ServerAlias www.learn.cmaology.com
ServerAlias mail.learn.cmaology.com
ServerAlias webmail.learn.cmaology.com
ServerAlias admin.learn.cmaology.com
DocumentRoot /home/cmaology/domains/learn.cmaology.com/public_html
ErrorLog /var/log/virtualmin/learn.cmaology.com_error_log
CustomLog /var/log/virtualmin/learn.cmaology.com_access_log combined
ScriptAlias /cgi-bin/ /home/cmaology/domains/learn.cmaology.com/cgi-bin/
DirectoryIndex index.php index.php4 index.php5 index.htm index.html
<Directory /home/cmaology/domains/learn.cmaology.com/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory /home/cmaology/domains/learn.cmaology.com/cgi-bin>
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
ProxyPass /.well-known !
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.learn.cmaology.com
RewriteRule ^/(?!.well-known)(.*)$ https://learn.cmaology.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.learn.cmaology.com
RewriteRule ^/(?!.well-known)(.*)$ https://learn.cmaology.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php8.1
RemoveHandler .php8.2
RemoveHandler .php8.4
SSLEngine on
SSLCertificateFile /etc/ssl/virtualmin/17815071234503/ssl.cert
SSLCertificateKeyFile /etc/ssl/virtualmin/17815071234503/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCACertificateFile /etc/ssl/virtualmin/17815071234503/ssl.ca
<FilesMatch \.php$>
SetHandler proxy:unix:/run/php/17815071234503.sock|fcgi://127.0.0.1
</FilesMatch>
</VirtualHost>