Files
addons/nginx_proxy/data/nginx.conf
blacktirion 9e3e9fdeff nginx_proxy: Remove IPv6 Listen statements from nginx.conf (#991)
* nginx_proxy: Remove IPv6 Listen statements from nginx.conf

Pursuant to PR https://github.com/home-assistant/hassio-addons/pull/972, making this change hard-coded, rather than an option to be set in the Addon Config.

* remove ipv6only=off statement from nginx.conf

As mentioned in https://github.com/home-assistant/hassio-addons/pull/991#issuecomment-573351637

* Update config.json

* Update CHANGELOG.md

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-01-14 09:40:48 +01:00

69 lines
1.7 KiB
Nginx Configuration File

daemon off;
error_log stderr;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server_names_hash_bucket_size 64;
#include /data/cloudflare.conf;
server {
server_name _;
listen 80 default_server;
listen 443 ssl http2 default_server;
ssl_certificate /data/ssl-cert-snakeoil.pem;
ssl_certificate_key /data/ssl-cert-snakeoil.key;
return 444;
}
server {
server_name %%DOMAIN%%;
# These shouldn't need to be changed
listen 80;
return 301 https://$host$request_uri;
}
server {
server_name %%DOMAIN%%;
ssl_certificate /ssl/%%FULLCHAIN%%;
ssl_certificate_key /ssl/%%PRIVKEY%%;
# dhparams file
ssl_dhparam /data/dhparams.pem;
listen 443 ssl http2;
%%HSTS%%
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
proxy_buffering off;
#include /share/nginx_proxy_default*.conf;
location / {
proxy_pass http://homeassistant.local.hass.io:8123;
proxy_set_header Host $host;
proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
#include /share/nginx_proxy/*.conf;
}