2017-10-04 07:26:00 +02:00
|
|
|
upstream backend {
|
2018-01-27 06:19:40 +01:00
|
|
|
server 127.0.0.1:9999; # Change to the port you specified on lolisafe
|
2017-10-04 07:26:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
listen [::]:80;
|
|
|
|
|
|
|
|
server_name lolisafe.moe;
|
|
|
|
|
|
|
|
client_max_body_size 100M; # Change this to the max file size you want to allow
|
|
|
|
|
2018-02-12 05:49:11 +01:00
|
|
|
# Uncomment if you are running lolisafe behind CloudFlare.
|
2018-04-02 08:53:26 +02:00
|
|
|
# This requires NGINX compiled from source with:
|
|
|
|
# --with-http_realip_module
|
2018-04-02 08:52:09 +02:00
|
|
|
#include /path/to/lolisafe/real-ip-from-cf;
|
2018-02-12 05:49:11 +01:00
|
|
|
|
2017-10-04 07:26:00 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|