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