Blazing fast file uploader and awesome bunker written in node! 🚀 https://gang.moe
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pomf.conf 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. upstream backend {
  2. server 127.0.0.1:9999; # Change to the port you specified on lolisafe
  3. }
  4. map $sent_http_content_type $charset {
  5. ~^text/ utf-8;
  6. }
  7. server {
  8. listen 80;
  9. listen [::]:80;
  10. server_name gang.moe;
  11. return 301 https://$server_name$request_uri;
  12. }
  13. server {
  14. listen 443 ssl http2;
  15. listen [::]:443 ssl http2;
  16. server_name gang.moe;
  17. server_tokens off;
  18. ssl_trusted_certificate /root/.acme.sh/gang.mù_ecc/ca.cer;
  19. ssl_certificate /root/.acme.sh/gang.mù_ecc/fullchain.cer;
  20. ssl_certificate_key /root/.acme.sh/gang.mù_ecc/waifu.social.key;
  21. # Add TLSv1.0 to support older devices
  22. ssl_protocols TLSv1.2 TLSv1.3;
  23. # Uncomment line below if you want to support older devices (Before Android 4.4.2, IE 8, etc.)
  24. # ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
  25. ssl_ciphers TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES;
  26. ssl_prefer_server_ciphers on;
  27. # In case of an old server with an OpenSSL version of 1.0.2 or below,
  28. # leave only prime256v1 or comment out the following line.
  29. ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1;
  30. ssl_stapling on;
  31. ssl_stapling_verify on;
  32. client_max_body_size 200M; # Change this to the max file size you want to allow
  33. charset $charset;
  34. charset_types *;
  35. # Uncomment if you are running lolisafe behind CloudFlare.
  36. # This requires NGINX compiled from source with:
  37. # --with-http_realip_module
  38. #include /path/to/lolisafe/real-ip-from-cf;
  39. location / {
  40. add_header Access-Control-Allow-Origin *;
  41. root /path/to/your/uploads/folder;
  42. try_files $uri @proxy;
  43. }
  44. location @proxy {
  45. proxy_set_header X-Real-IP $remote_addr;
  46. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  47. proxy_set_header Host $http_host;
  48. proxy_set_header X-NginX-Proxy true;
  49. proxy_pass http://backend;
  50. proxy_redirect off;
  51. proxy_http_version 1.1;
  52. proxy_set_header Upgrade $http_upgrade;
  53. proxy_set_header Connection "upgrade";
  54. proxy_redirect off;
  55. proxy_set_header X-Forwarded-Proto $scheme;
  56. }
  57. }