home-assistant-addon/esphome-dev/rootfs/etc/nginx/servers/direct-ssl.disabled

23 lines
642 B
Plaintext
Raw Normal View History

2019-04-24 17:09:50 +02:00
server {
listen %%port%% default_server ssl http2;
include /etc/nginx/includes/server_params.conf;
2019-05-15 14:41:44 +02:00
include /etc/nginx/includes/proxy_params.conf;
include /etc/nginx/includes/ssl_params.conf;
2019-06-06 13:21:54 +02:00
ssl on;
ssl_certificate /ssl/%%certfile%%;
ssl_certificate_key /ssl/%%keyfile%%;
2019-05-15 14:41:44 +02:00
# Clear Hass.io Ingress header
proxy_set_header X-Hassio-Ingress "";
2019-04-24 17:09:50 +02:00
2019-05-15 14:41:44 +02:00
# Redirect http requests to https on the same port.
2019-04-24 17:09:50 +02:00
# https://rageagainstshell.com/2016/11/redirect-http-to-https-on-the-same-port-in-nginx/
error_page 497 https://$http_host$request_uri;
location / {
proxy_pass http://esphome;
}
}