File: //etc/apache2/sites-available/thangmaycanny.vn.conf
<VirtualHost 139.99.89.198:80 [2402:1f00:8000:800::3c91]:80>
ServerName thangmaycanny.vn
ServerAlias www.thangmaycanny.vn
ServerAlias mail.thangmaycanny.vn
ServerAlias webmail.thangmaycanny.vn
ServerAlias admin.thangmaycanny.vn
ServerAlias thangmaycanny.com.vn
ServerAlias www.thangmaycanny.com.vn
ServerAlias mail.thangmaycanny.com.vn
ServerAlias webmail.thangmaycanny.com.vn
ServerAlias admin.thangmaycanny.com.vn
DocumentRoot /home/thangmaycanny/public_html
ErrorLog /var/log/virtualmin/thangmaycanny.vn_error_log
CustomLog /var/log/virtualmin/thangmaycanny.vn_access_log combined
DirectoryIndex index.php index.htm index.html
<Directory /home/thangmaycanny/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory /home/thangmaycanny/cgi-bin>
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
ProxyPass /.well-known !
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.thangmaycanny.vn
RewriteRule ^(?!/.well-known)(.*) https://thangmaycanny.vn:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.thangmaycanny.vn
RewriteRule ^(?!/.well-known)(.*) https://thangmaycanny.vn:10000/ [R]
RemoveHandler .php
RemoveHandler .php5.6
RemoveHandler .php7.4
ScriptAlias /awstats /home/thangmaycanny/cgi-bin/awstats.pl
RedirectMatch ^/awstats$ /awstats/
<Files awstats.pl>
AuthName "thangmaycanny.vn statistics"
AuthType Basic
AuthUserFile /home/thangmaycanny/.awstats-htpasswd
require valid-user
</Files>
RewriteCond %{HTTP_HOST} =webmail.thangmaycanny.com.vn
RewriteRule ^(?!/.well-known)(.*) https://thangmaycanny.com.vn:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.thangmaycanny.com.vn
RewriteRule ^(?!/.well-known)(.*) https://thangmaycanny.com.vn:10000/ [R]
<FilesMatch \.php$>
SetHandler proxy:unix:/run/php/1713440059314068.sock|fcgi://127.0.0.1
</FilesMatch>
</VirtualHost>
<VirtualHost 139.99.89.198:443 [2402:1f00:8000:800::3c91]:443>
ServerName thangmaycanny.vn
ServerAlias www.thangmaycanny.vn
ServerAlias mail.thangmaycanny.vn
ServerAlias webmail.thangmaycanny.vn
ServerAlias admin.thangmaycanny.vn
ServerAlias thangmaycanny.com.vn
ServerAlias www.thangmaycanny.com.vn
ServerAlias mail.thangmaycanny.com.vn
DocumentRoot /home/thangmaycanny/public_html
ErrorLog /var/log/virtualmin/thangmaycanny.vn_error_log
CustomLog /var/log/virtualmin/thangmaycanny.vn_access_log combined
DirectoryIndex index.php index.htm index.html
<Directory /home/thangmaycanny/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory /home/thangmaycanny/cgi-bin>
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
ProxyPass /.well-known !
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.thangmaycanny.vn
RewriteRule ^(?!/.well-known)(.*) https://thangmaycanny.vn:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.thangmaycanny.vn
RewriteRule ^(?!/.well-known)(.*) https://thangmaycanny.vn:10000/ [R]
RemoveHandler .php
RemoveHandler .php5.6
RemoveHandler .php7.4
SSLEngine on
SSLCertificateFile /etc/ssl/virtualmin/1713440059314068/ssl.cert
SSLCertificateKeyFile /etc/ssl/virtualmin/1713440059314068/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
ScriptAlias /awstats /home/thangmaycanny/cgi-bin/awstats.pl
RedirectMatch ^/awstats$ /awstats/
<Files awstats.pl>
AuthName "thangmaycanny.vn statistics"
AuthType Basic
AuthUserFile /home/thangmaycanny/.awstats-htpasswd
require valid-user
</Files>
<FilesMatch \.php$>
SetHandler proxy:unix:/run/php/1713440059314068.sock|fcgi://127.0.0.1
</FilesMatch>
</VirtualHost>