omnireader_http 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. server {
  2. listen 80;
  3. server_name omnireader.ru b.omnireader.ru;
  4. set $liberama http://127.0.0.1:44081;
  5. client_max_body_size 50m;
  6. proxy_read_timeout 1h;
  7. gzip on;
  8. gzip_min_length 1024;
  9. gzip_proxied expired no-cache no-store private auth;
  10. gzip_types *;
  11. location @liberama {
  12. proxy_pass $liberama;
  13. }
  14. location /api {
  15. proxy_pass $liberama;
  16. }
  17. location /ws {
  18. proxy_pass $liberama;
  19. proxy_http_version 1.1;
  20. proxy_set_header Upgrade $http_upgrade;
  21. proxy_set_header Connection "upgrade";
  22. }
  23. location /tmp {
  24. root /home/liberama/.liberama/public-files;
  25. types { } default_type "application/xml; charset=utf-8";
  26. add_header Content-Encoding gzip;
  27. try_files $uri @liberama;
  28. }
  29. location /upload {
  30. root /home/liberama/.liberama/public-files;
  31. try_files $uri @liberama;
  32. }
  33. location / {
  34. root /home/liberama/.liberama/public;
  35. location ~* \.(?:manifest|appcache|html)$ {
  36. expires -1;
  37. }
  38. }
  39. }
  40. server {
  41. listen 80;
  42. server_name old.omnireader.ru;
  43. client_max_body_size 50m;
  44. gzip on;
  45. gzip_min_length 1024;
  46. gzip_proxied expired no-cache no-store private auth;
  47. gzip_types *;
  48. root /home/oldreader;
  49. index index.html;
  50. # Обработка php файлов с помощью fpm
  51. location ~ \.php$ {
  52. try_files $uri =404;
  53. include /etc/nginx/fastcgi.conf;
  54. fastcgi_pass unix:/run/php/php7.4-fpm.sock;
  55. }
  56. }