vhost
This commit is contained in:
parent
2199d81f1e
commit
de5d7e9a5a
@ -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)
|
||||||
|
|||||||
@ -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>
|
||||||
Loading…
x
Reference in New Issue
Block a user