Good day!
I tried to place the code you give to me.
<VirtualHost 192.168.0.160:80>
SuexecUserGroup “#1001” “#1001”
ServerName mis-office.tk
ServerAlias www.mis-office.tk
ServerAlias mail.mis-office.tk
ServerAlias webmail.mis-office.tk
ServerAlias admin.mis-office.tk
DocumentRoot /home/misofffice/public_html
ErrorLog /var/log/virtualmin/mis-office.tk_error_log
CustomLog /var/log/virtualmin/mis-office.tk_access_log combined
ScriptAlias /cgi-bin/ /home/misofffice/cgi-bin/
ScriptAlias /awstats/ /home/misofffice/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/misofffice/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 .php7.3
FCGIWrapper /home/misofffice/fcgi-bin/php7.3.fcgi .php
FCGIWrapper /home/misofffice/fcgi-bin/php7.3.fcgi .php7.3
<Directory /home/misofffice/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge [NC]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTP_HOST} =webmail.mis-office.tk
RewriteRule ^(.) https://mis-office.tk:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.mis-office.tk
RewriteRule ^(.) https://mis-office.tk:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.3
FcgidMaxRequestLen 1073741824
AuthName “mis-office.tk statistics”
AuthType Basic
AuthUserFile /home/misofffice/.awstats-htpasswd
require valid-user
<VirtualHost 192.168.0.160:443>
SuexecUserGroup “#1001” “#1001”
ServerName mis-office.tk
ServerAlias www.mis-office.tk
ServerAlias mail.mis-office.tk
ServerAlias webmail.mis-office.tk
ServerAlias admin.mis-office.tk
DocumentRoot /home/misofffice/public_html
ErrorLog /var/log/virtualmin/mis-office.tk_error_log
CustomLog /var/log/virtualmin/mis-office.tk_access_log combined
ScriptAlias /cgi-bin/ /home/misofffice/cgi-bin/
ScriptAlias /awstats/ /home/misofffice/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/misofffice/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 .php7.3
FCGIWrapper /home/misofffice/fcgi-bin/php7.3.fcgi .php
FCGIWrapper /home/misofffice/fcgi-bin/php7.3.fcgi .php7.3
<Directory /home/misofffice/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge [NC]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTP_HOST} =webmail.mis-office.tk
RewriteRule ^(.) https://mis-office.tk:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.mis-office.tk
RewriteRule ^(.) https://mis-office.tk:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.3
FcgidMaxRequestLen 1073741824
SSLEngine on
SSLCertificateFile /home/misofffice/ssl.cert
SSLCertificateKeyFile /home/misofffice/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
AuthName “mis-office.tk statistics”
AuthType Basic
AuthUserFile /home/misofffice/.awstats-htpasswd
require valid-user
This is the error i got
Requesting a certificate for mis-office.tk, www.mis-office.tk, mail.mis-office.tk from Let’s Encrypt …
… request failed : Web-based validation failed : Failed to request certificate :
Traceback (most recent call last):
File “/usr/share/webmin/webmin/acme_tiny.py”, line 198, in
main(sys.argv[1:])
File “/usr/share/webmin/webmin/acme_tiny.py”, line 194, in main
signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca, disable_check=args.disable_check, directory_url=args.directory_url, contact=args.contact)
File “/usr/share/webmin/webmin/acme_tiny.py”, line 112, in get_crt
account, code, acct_headers = _send_signed_request(directory[‘newAccount’], reg_payload, “Error registering”)
File “/usr/share/webmin/webmin/acme_tiny.py”, line 52, in _send_signed_request
new_nonce = _do_request(directory[‘newNonce’])[2][‘Replay-Nonce’]
File “/usr/share/webmin/webmin/acme_tiny.py”, line 46, in _do_request
raise ValueError("{0}:\nUrl: {1}\nData: {2}\nResponse Code: {3}\nResponse: {4}".format(err_msg, url, data, code, resp_data))
ValueError: Error:
Url: https://acme-v02.api.letsencrypt.org/acme/new-nonce
Data: None
Response Code: None
Response: <urlopen error [Errno 104] Connection reset by peer>