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