How to use certbot with <VirtualHost *:8080>

It's this (thank you)

<VirtualHost *:8080>
SuexecUserGroup "#1000" "#1000"
ServerName wp.ondata.it


# Server aliases for wordpress multisite domain mapping
ServerAlias blog.ondata.it
ServerAlias anothere1.ondata.it
ServerAlias anothere2.ondata.it
#

DocumentRoot /home/ondata/domains/wp.ondata.it/public_html
ErrorLog /var/log/virtualmin/wp.ondata.it_error_log
CustomLog /var/log/virtualmin/wp.ondata.it_access_log combined
ScriptAlias /cgi-bin/ /home/ondata/domains/wp.ondata.it/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/ondata/domains/wp.ondata.it/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
AddHandler fcgid-script .php7.0
FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php7.0.fcgi .php
#FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/ondata/domains/wp.ondata.it/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.wp.ondata.it
RewriteRule ^(.*) https://wp.ondata.it:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.wp.ondata.it
RewriteRule ^(.*) https://wp.ondata.it:48121/ [R]
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.0
php_admin_value engine Off
IPCCommTimeout 31
FcgidMaxRequestLen 1073741824
</VirtualHost>
<VirtualHost *:443>
SuexecUserGroup "#1000" "#1000"
ServerName wp.ondata.it
DocumentRoot /home/ondata/domains/wp.ondata.it/public_html
ErrorLog /var/log/virtualmin/wp.ondata.it_error_log
CustomLog /var/log/virtualmin/wp.ondata.it_access_log combined
ScriptAlias /cgi-bin/ /home/ondata/domains/wp.ondata.it/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/ondata/domains/wp.ondata.it/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
AddHandler fcgid-script .php7.0
#FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/ondata/domains/wp.ondata.it/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.wp.ondata.it
RewriteRule ^(.*) https://wp.ondata.it:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.wp.ondata.it
RewriteRule ^(.*) https://wp.ondata.it:48121/ [R]
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.0
php_admin_value engine Off
IPCCommTimeout 31
FcgidMaxRequestLen 1073741824
SSLEngine on
SSLCertificateFile /home/ondata/domains/wp.ondata.it/ssl.cert
SSLCertificateKeyFile /home/ondata/domains/wp.ondata.it/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
</VirtualHost>
1 Like