This commit is contained in:
gauthiier 2018-11-28 10:13:04 +01:00
parent 2199d81f1e
commit de5d7e9a5a
2 changed files with 8 additions and 2 deletions

View File

@ -93,8 +93,13 @@ def vhost_add(domain):
# check is ssl cert exists # check is ssl cert exists
cert = os.path.join('/etc/letsencrypt/live', domain) cert = os.path.join('/etc/letsencrypt/live', domain)
if not os.path.exists(cert): if not os.path.exists(cert):
print("SSL certificates do not exist for domain - " + domain) print("warning: SSL certificates do not exist for domain - " + domain)
print("Please make sure to place them in " + cert + "to allow secure https") print("warning: Please make sure to place them in " + cert + " to allow secure https connection to your site.")
# mv conf file to apache
if y_n_question("Move " + vhost_file + " to /etc/apache2/sites-available/ ?"):
vhost_conf_file = os.path.join('/etc/apache2/sites-available/', domain + '.conf')
subprocess.call(['sudo', 'mv', vhost_file, vhost_conf_file])
def vhost_remove(domain): def vhost_remove(domain):
print(" removing domain — " + domain) print(" removing domain — " + domain)

View File

@ -23,4 +23,5 @@
SSLEngine on SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/%domain?/cert.pem SSLCertificateFile /etc/letsencrypt/live/%domain?/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/%domain?/privkey.pem SSLCertificateKeyFile /etc/letsencrypt/live/%domain?/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/%domain?/fullchain.pem
</VirtualHost> </VirtualHost>