From 9d811c3d9c1f4e7ad90c9b1e2bc0d85d1c7da225 Mon Sep 17 00:00:00 2001
From: Xiao Pan <gky44px1999@gmail.com>
Date: Fri, 22 Dec 2023 05:39:58 +0000
Subject: nginx enable ipv6. Switch from systemd-networkd to networkmanager
 because somehow I could not ping studio global pubic ipv6 (stateless address
 auto-configuration? (SLAAC)?), but I can ping link-local address which makes
 the issue very weird

---
 etc/nginx/nginx.conf | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'etc/nginx')

diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf
index d66bffb9..6b7b8d2d 100644
--- a/etc/nginx/nginx.conf
+++ b/etc/nginx/nginx.conf
@@ -33,9 +33,12 @@ http {
     #gzip  on;
 
     server {
-        listen       80;
+        listen 80;
+        # needed for ipv6
+        listen [::]:80;
         # https://nginx.org/en/docs/http/configuring_https_servers.html#single_http_https_server
-        listen       443 ssl;
+        listen 443 ssl;
+        listen [::]:443 ssl;
         server_name  flylightning.xyz;
 
         ssl_certificate      /etc/nginx/flylightning.pem;
@@ -121,7 +124,9 @@ http {
 
     server {
         listen 80;
+        listen [::]:80;
         listen 443 ssl;
+        listen [::]:443 ssl;
         server_name mirrors.flylightning.xyz;
 
         ssl_certificate      /etc/nginx/flylightning.pem;
@@ -140,7 +145,9 @@ http {
     # https://stackoverflow.com/questions/16182421/cgit-and-nginx-url-rewrite
     server {
         listen 80;
+        listen [::]:80;
         listen 443 ssl;
+        listen [::]:443 ssl;
         server_name git.flylightning.xyz;
         root /usr/share/webapps/cgit;
 
-- 
cgit v1.2.3-70-g09d2