25 lines
839 B
Text
25 lines
839 B
Text
|
server {
|
||
|
listen 80;
|
||
|
server_name {{ uptimekuma_domain }};
|
||
|
include snippets/letsencrypt.conf;
|
||
|
location / { return 301 https://$http_host$request_uri; }
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 443 ssl http2;
|
||
|
server_name {{ uptimekuma_domain }};
|
||
|
ssl_certificate /var/lib/dehydrated/certs/{{ uptimekuma_domain }}/fullchain.pem;
|
||
|
ssl_certificate_key /var/lib/dehydrated/certs/{{ uptimekuma_domain }}/privkey.pem;
|
||
|
include /etc/nginx/snippets/add_headers.conf;
|
||
|
|
||
|
location / {
|
||
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
proxy_set_header Host $host;
|
||
|
proxy_http_version 1.1;
|
||
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
proxy_set_header Connection "upgrade";
|
||
|
proxy_pass http://{{ inventory_hostname }}:{{ uptimekuma_port }};
|
||
|
}
|
||
|
}
|