I had a typo in the post, but its correct in the file. I’m pasting the entire website.com.conf
file
<VirtualHost my.ip:80>
SuexecUserGroup "#1113" "#1025"
ServerName website.com
ServerAlias www.website.com
ServerAlias mail.website.com
ServerAlias webmail.website.com
ServerAlias admin.website.com
DocumentRoot /home/website/public_html
ErrorLog /var/log/virtualmin/website.com_error_log
CustomLog /var/log/virtualmin/website.com_access_log combined
ScriptAlias /cgi-bin/ /home/website/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/website/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory /home/website/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.website.com
RewriteRule ^(?!/.well-known)(.*) https://website.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.website.com
RewriteRule ^(?!/.well-known)(.*) https://website.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.2
php_admin_value engine Off
<FilesMatch \.php$>
SetHandler proxy:fcgi://localhost:8003
</FilesMatch>
RedirectMatch ^/(?!.well-known)(.*)$ https://website.com/$1
php_value memory_limit 32M
php_value upload_max_filesize 8M
php_value display_errors On
</VirtualHost>
<VirtualHost my.ip:443>
Protocols h2 http/1.1
SuexecUserGroup "#1113" "#1025"
ServerName website.com
ServerAlias www.website.com
ServerAlias mail.website.com
ServerAlias webmail.website.com
ServerAlias admin.website.com
DocumentRoot /home/website/public_html
ErrorLog /var/log/virtualmin/website.com_error_log
CustomLog /var/log/virtualmin/website.com_access_log combined
ScriptAlias /cgi-bin/ /home/website/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/website/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory /home/website/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.website.com
RewriteRule ^(?!/.well-known)(.*) https://website.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.website.com
RewriteRule ^(?!/.well-known)(.*) https://website.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.2
php_admin_value engine Off
<FilesMatch \.php$>
SetHandler proxy:fcgi://localhost:8003
</FilesMatch>
SSLEngine on
SSLCertificateFile /home/website/ssl.cert
SSLCertificateKeyFile /home/website/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCACertificateFile /home/website/ssl.ca
php_value memory_limit 32M
php_value upload_max_filesize 8M
php_value display_errors On
</VirtualHost>
Here’s what I get from enabling the modules you asked
[root@primary ~]# sudo a2enmod ssl
Considering dependency setenvif for ssl: Module setenvif already enabled
Considering dependency mime for ssl: Module mime already enabled
Considering dependency socache_shmcb for ssl: Module socache_shmcb already enabled Module ssl already enabled
[root@primary ~]# sudo a2enmod http2
Module http2 already enabled