fix: nginx stuff
This commit is contained in:
parent
a23206f390
commit
85d0c68453
7
sites.py
7
sites.py
@ -250,9 +250,7 @@ def write_nginx_conf(site):
|
|||||||
add_header Cache-Control 'must-revalidate';
|
add_header Cache-Control 'must-revalidate';
|
||||||
add_header Content-Type text/plain;
|
add_header Content-Type text/plain;
|
||||||
}}
|
}}
|
||||||
listen 443 ssl;
|
{ssl}
|
||||||
ssl_certificate /root/site-manager/certs/{alt}/cert.crt;
|
|
||||||
ssl_certificate_key /root/site-manager/certs/{alt}/cert.key;
|
|
||||||
}}
|
}}
|
||||||
'''
|
'''
|
||||||
with open(f'/etc/nginx/sites-enabled/{id}.conf', 'w') as file:
|
with open(f'/etc/nginx/sites-enabled/{id}.conf', 'w') as file:
|
||||||
@ -285,4 +283,5 @@ def is_icann(domain):
|
|||||||
# Remove any comments
|
# Remove any comments
|
||||||
tlds = [tld for tld in tlds if not tld.startswith('#')]
|
tlds = [tld for tld in tlds if not tld.startswith('#')]
|
||||||
if domain.split('.')[-1].upper() in tlds:
|
if domain.split('.')[-1].upper() in tlds:
|
||||||
return True
|
return True
|
||||||
|
return False
|
Loading…
Reference in New Issue
Block a user