2017-10-04 05:26:00 +00:00
|
|
|
upstream backend {
|
2018-03-18 13:41:09 +00:00
|
|
|
server 127.0.0.1:9999; # Change to the port you specified on lolisafe
|
2017-10-04 05:26:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2018-03-18 13:41:09 +00:00
|
|
|
listen 80;
|
|
|
|
listen [::]:80;
|
2017-10-04 05:26:00 +00:00
|
|
|
|
2018-03-18 13:41:09 +00:00
|
|
|
server_name lolisafe.moe;
|
2017-10-04 05:26:00 +00:00
|
|
|
|
2018-03-18 13:41:09 +00:00
|
|
|
client_max_body_size 100M; # Change this to the max file size you want to allow
|
2017-10-04 05:26:00 +00:00
|
|
|
|
2018-03-18 13:41:09 +00:00
|
|
|
location / {
|
|
|
|
add_header Access-Control-Allow-Origin *;
|
|
|
|
root /path/to/your/uploads/folder;
|
|
|
|
try_files $uri @proxy;
|
|
|
|
}
|
2017-10-04 05:26:00 +00:00
|
|
|
|
2018-03-18 13:41:09 +00:00
|
|
|
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;
|
|
|
|
}
|
2017-10-04 05:26:00 +00:00
|
|
|
}
|