unifi: Switch from nginx to Caddy
Mostly for built-in ACME support.
This commit is contained in:
13
roles/unifi/templates/unifi.caddyfile.j2
Normal file
13
roles/unifi/templates/unifi.caddyfile.j2
Normal file
@@ -0,0 +1,13 @@
|
||||
{{ unifi_server_name }} {
|
||||
reverse_proxy localhost:8443 {
|
||||
transport http {
|
||||
tls_insecure_skip_verify
|
||||
}
|
||||
}
|
||||
{% if unifi_caddy_acme|d %}
|
||||
|
||||
tls {{ unifi_caddy_acme.email }} {
|
||||
ca {{ unifi_caddy_acme.url }}
|
||||
}
|
||||
{% endif %}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
location / {
|
||||
proxy_pass https://127.0.0.1:8443/;
|
||||
proxy_ssl_verify off;
|
||||
client_max_body_size 50m;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
Reference in New Issue
Block a user