beta.liberama 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. server {
  2. listen 443 ssl; # managed by Certbot
  3. ssl_certificate /etc/letsencrypt/live/beta.liberama.top/fullchain.pem; # managed by Certbot
  4. ssl_certificate_key /etc/letsencrypt/live/beta.liberama.top/privkey.pem; # managed by Certbot
  5. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  6. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  7. server_name beta.liberama.top;
  8. set $liberama http://127.0.0.1:34082;
  9. client_max_body_size 50m;
  10. proxy_read_timeout 1h;
  11. gzip on;
  12. gzip_min_length 1024;
  13. gzip_proxied expired no-cache no-store private auth;
  14. gzip_types *;
  15. location @liberama {
  16. proxy_pass $liberama;
  17. }
  18. location /api {
  19. proxy_pass $liberama;
  20. }
  21. location /ws {
  22. proxy_pass $liberama;
  23. proxy_http_version 1.1;
  24. proxy_set_header Upgrade $http_upgrade;
  25. proxy_set_header Connection "upgrade";
  26. proxy_read_timeout 600s;
  27. }
  28. location / {
  29. root /home/beta.liberama/public;
  30. location /tmp {
  31. types { } default_type "application/xml; charset=utf-8";
  32. add_header Content-Encoding gzip;
  33. try_files $uri @liberama;
  34. }
  35. location /upload {
  36. try_files $uri @liberama;
  37. }
  38. location ~* \.(?:manifest|appcache|html)$ {
  39. expires -1;
  40. }
  41. }
  42. }
  43. server {
  44. listen 80;
  45. server_name beta.liberama.top;
  46. return 301 https://$host$request_uri;
  47. }
  48. server {
  49. listen 80;
  50. server_name b.beta.liberama.top;
  51. set $liberama http://127.0.0.1:34082;
  52. client_max_body_size 50m;
  53. proxy_read_timeout 1h;
  54. gzip on;
  55. gzip_min_length 1024;
  56. gzip_proxied expired no-cache no-store private auth;
  57. gzip_types *;
  58. location @liberama {
  59. proxy_pass $liberama;
  60. }
  61. location /api {
  62. proxy_pass $liberama;
  63. }
  64. location /ws {
  65. proxy_pass $liberama;
  66. proxy_http_version 1.1;
  67. proxy_set_header Upgrade $http_upgrade;
  68. proxy_set_header Connection "upgrade";
  69. proxy_read_timeout 600s;
  70. }
  71. location /tmp {
  72. root /home/beta.liberama/.liberama/public-files;
  73. types { } default_type "application/xml; charset=utf-8";
  74. add_header Content-Encoding gzip;
  75. try_files $uri @liberama;
  76. }
  77. location /upload {
  78. root /home/beta.liberama/.liberama/public-files;
  79. try_files $uri @liberama;
  80. }
  81. location / {
  82. root /home/beta.liberama/.liberama/public;
  83. location ~* \.(?:manifest|appcache|html)$ {
  84. expires -1;
  85. }
  86. }
  87. }