Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1486a67

Browse files
EyMaddisfabaff
authored andcommitted
bind HTTPS to ipv6 port in NGINX example configuration (home-assistant#2492)
* bind HTTPS to ipv6 port * let NGINX bind to ports on IPv4 and 6, add http2 note
1 parent 1143d0a commit 1486a67

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

source/_docs/ecosystem/nginx.markdown

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ http {
8989
server_name example.com;
9090
9191
# These shouldn't need to be changed
92-
listen 80 default_server;
93-
listen [::]:80 default_server ipv6only=on;
92+
listen [::]:80 default_server ipv6only=off;
9493
return 301 https://$host$request_uri;
9594
}
9695
@@ -110,7 +109,7 @@ http {
110109
111110
112111
# These shouldn't need to be changed
113-
listen 443 default_server;
112+
listen [::]:443 default_server ipv6only=off; # if your nginx version is >= 1.9.5 you can also add the "http2" flag here
114113
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
115114
ssl on;
116115
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

0 commit comments

Comments
 (0)