vhost
This commit is contained in:
parent
f21dc3fe27
commit
bb4a9fac09
@ -93,8 +93,8 @@ 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("warning: SSL certificates do not exist for domain - " + domain)
|
print(" warning: SSL certificates do not exist for domain - " + domain)
|
||||||
print("warning: Please make sure to place them in " + cert + " to allow secure https connection to your site.")
|
print(" warning: Please make sure to place them in " + cert + " to allow secure https connection to your site.")
|
||||||
|
|
||||||
# mv conf file to apache
|
# mv conf file to apache
|
||||||
if y_n_question("Move " + vhost_file + " to /etc/apache2/sites-available/ ?"):
|
if y_n_question("Move " + vhost_file + " to /etc/apache2/sites-available/ ?"):
|
||||||
@ -143,6 +143,9 @@ if __name__ == "__main__":
|
|||||||
elif args.remove:
|
elif args.remove:
|
||||||
vhost_remove(d)
|
vhost_remove(d)
|
||||||
|
|
||||||
|
if y_n_question("Restart apache2?"):
|
||||||
|
subprocess.call(['sudo', 'service', 'apache2', 'restart'])
|
||||||
|
|
||||||
print('done.')
|
print('done.')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user