fix: nginx stuff

This commit is contained in:
Nathan Woodburn 2024-02-23 15:59:01 +11:00
parent a23206f390
commit 85d0c68453
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -250,9 +250,7 @@ def write_nginx_conf(site):
add_header Cache-Control 'must-revalidate';
add_header Content-Type text/plain;
}}
listen 443 ssl;
ssl_certificate /root/site-manager/certs/{alt}/cert.crt;
ssl_certificate_key /root/site-manager/certs/{alt}/cert.key;
{ssl}
}}
'''
with open(f'/etc/nginx/sites-enabled/{id}.conf', 'w') as file:
@ -286,3 +284,4 @@ def is_icann(domain):
tlds = [tld for tld in tlds if not tld.startswith('#')]
if domain.split('.')[-1].upper() in tlds:
return True
return False