Browse Source

Updated README and added nginx sample configuration file

Pitu 6 years ago
parent
commit
5ff33ba930
2 changed files with 65 additions and 30 deletions
  1. 22 30
      README.md
  2. 43 0
      nginx.sample.conf

File diff suppressed because it is too large
+ 22 - 30
README.md


+ 43 - 0
nginx.sample.conf

@@ -0,0 +1,43 @@
+upstream backend {
+	server 127.0.0.1:3000; # Change to the port you specified on lolisafe
+}
+
+server {
+	listen 80;
+	listen [::]:80;
+	server_name lolisafe.moe;
+	return 301 https://$server_name$request_uri;
+}
+
+server {
+	listen 443 ssl http2;
+	listen [::]:443 ssl http2;
+
+	server_name lolisafe.moe;
+
+	ssl_certificate /path/to/your/fullchain.pem;
+	ssl_certificate_key /path/to/your/privkey.pem;
+	ssl_trusted_certificate /path/to/your/fullchain.pem;
+
+	client_max_body_size 100M; # Change this to the max file size you want to allow
+
+	location / {
+		add_header Access-Control-Allow-Origin *;
+		root /path/to/your/uploads/folder;
+		try_files $uri @proxy;
+	}
+
+	location @proxy {
+		proxy_set_header X-Real-IP $remote_addr;
+		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+		proxy_set_header Host $http_host;
+		proxy_set_header X-NginX-Proxy true;
+		proxy_pass http://backend;
+		proxy_redirect off;
+		proxy_http_version 1.1;
+		proxy_set_header Upgrade $http_upgrade;
+		proxy_set_header Connection "upgrade";
+		proxy_redirect off;
+		proxy_set_header X-Forwarded-Proto $scheme;
+	}
+}