summary refs log tree commit diff
path: root/nginx.conf
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-19 22:48:25 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-19 22:48:25 +1100
commit2771e061662ae9446ca45bfad48d57b8c8129497 (patch)
treedbda84811c93f24b6c01911ec7714e1bfa9b6d25 /nginx.conf
parentReg tokens bypass other restrictions (diff)
downloadserver-2771e061662ae9446ca45bfad48d57b8c8129497.tar.xz
Add back various docs/readme
Diffstat (limited to 'nginx.conf')
-rw-r--r--nginx.conf26
1 files changed, 26 insertions, 0 deletions
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 00000000..141cf5ca
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,26 @@
+# This is an example nginx config for Fosscord.
+
+server {
+	# Change server_name
+    server_name fosscord.example.com;
+    listen 80;
+
+    location / {
+			# do NOT change this
+            proxy_pass http://127.0.0.1:3001; 
+            proxy_set_header Host $host;
+            proxy_pass_request_headers      on;
+            add_header Last-Modified $date_gmt;
+            add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
+            proxy_set_header  X-Real-IP $remote_addr;
+            proxy_set_header  X-Forwarded-Proto https;
+            proxy_set_header  X-Forwarded-For $remote_addr;
+            proxy_set_header  X-Forwarded-Host $remote_addr;
+            proxy_no_cache 1;
+            proxy_cache_bypass 1;
+
+			# this is important
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection "upgrade";
+    }
+}
\ No newline at end of file