nginx: fix acmetool-redirector/nginx setup

This commit is contained in:
missytake 2024-03-11 17:48:17 +01:00
parent 97d00ad074
commit e49bb43211
2 changed files with 6 additions and 3 deletions

View file

@ -31,7 +31,12 @@ def add_nginx_domain(domain: str, config_path: str = None, proxy_port: int = Non
default_config_link = files.link(
path="/etc/nginx/sites-enabled/default", present=False
)
need_restart = default_config_link.changed
if default_config_link.changed:
systemd.service(
name="reload nginx",
service="nginx.service",
reloaded=True,
)
if acmetool:
deploy_acmetool(nginx_hook=True, domains=[domain])

View file

@ -14,6 +14,4 @@ server {
listen 443 ssl http2;
ssl_certificate /var/lib/acme/live/{{ domain }}/fullchain; # managed by acmetool
ssl_certificate_key /var/lib/acme/live/{{ domain }}/privkey; # managed by acmetool
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}