Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. upstream backend {
  2. server 127.0.0.1:8080; # Change to the port you specified on lolisafe
  3. }
  4.  
  5. map $sent_http_content_type $charset {
  6. ~^text/ utf-8;
  7. }
  8.  
  9. server {
  10. listen 80;
  11. listen [::]:80;
  12.  
  13. server_name 86.xxx.xxx.xxx;
  14. server_tokens off;
  15.  
  16. client_max_body_size 100M; # Change this to the max file size you want to allow
  17.  
  18. charset $charset;
  19. charset_types *;
  20.  
  21. # Uncomment if you are running lolisafe behind CloudFlare.
  22. # This requires NGINX compiled from source with:
  23. # --with-http_realip_module
  24. #include /path/to/lolisafe/real-ip-from-cf;
  25.  
  26. location / {
  27. add_header Access-Control-Allow-Origin *;
  28. root /path/to/your/uploads/folder;
  29. try_files $uri @proxy;
  30. }
  31.  
  32. location @proxy {
  33. proxy_set_header X-Real-IP $remote_addr;
  34. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  35. proxy_set_header Host $http_host;
  36. proxy_set_header X-NginX-Proxy true;
  37. proxy_pass http://backend;
  38. proxy_redirect off;
  39. proxy_http_version 1.1;
  40. proxy_set_header Upgrade $http_upgrade;
  41. proxy_set_header Connection "upgrade";
  42. proxy_redirect off;
  43. proxy_set_header X-Forwarded-Proto $scheme;
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement