nginx.sample.conf 799 B

1234567891011121314151617181920212223242526272829303132
  1. upstream backend {
  2. server 127.0.0.1:9999; # Change to the port you specified on lolisafe
  3. }
  4. server {
  5. listen 80;
  6. listen [::]:80;
  7. server_name lolisafe.moe;
  8. client_max_body_size 100M; # Change this to the max file size you want to allow
  9. location / {
  10. add_header Access-Control-Allow-Origin *;
  11. root /path/to/your/uploads/folder;
  12. try_files $uri @proxy;
  13. }
  14. location @proxy {
  15. proxy_set_header X-Real-IP $remote_addr;
  16. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  17. proxy_set_header Host $http_host;
  18. proxy_set_header X-NginX-Proxy true;
  19. proxy_pass http://backend;
  20. proxy_redirect off;
  21. proxy_http_version 1.1;
  22. proxy_set_header Upgrade $http_upgrade;
  23. proxy_set_header Connection "upgrade";
  24. proxy_redirect off;
  25. proxy_set_header X-Forwarded-Proto $scheme;
  26. }
  27. }