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