home · contact · privacy
Add basic microblog.pub setup.
[config] / bullseye / etc_files / microblogpub / etc / nginx / sites-available / microblogpub.nginx
diff --git a/bullseye/etc_files/microblogpub/etc/nginx/sites-available/microblogpub.nginx b/bullseye/etc_files/microblogpub/etc/nginx/sites-available/microblogpub.nginx
new file mode 100644 (file)
index 0000000..36e2447
--- /dev/null
@@ -0,0 +1,23 @@
+server {
+    listen 443 ssl;
+    client_max_body_size 4G;
+    server_name REPLACE_fqdn_ECALPER;
+    ssl_certificate /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/fullchain.pem;
+    ssl_certificate_key /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/privkey.pem;
+
+    location / {
+      proxy_set_header Host $http_host;
+      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+      proxy_set_header X-Forwarded-Proto $scheme;
+      proxy_set_header Upgrade $http_upgrade;
+      proxy_set_header Connection $connection_upgrade;
+      proxy_redirect off;
+      proxy_buffering off;
+      proxy_pass http://localhost:8000;
+    }
+}
+
+map $http_upgrade $connection_upgrade {
+  default upgrade;
+  '' close;
+}