Advertisement
Guest User

/etc/nginx/conf.d/frappe-bench.conf

a guest
May 14th, 2016
89
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None
  1.  
  2. upstream frappe-bench-frappe {
  3. server 127.0.0.1:8000 fail_timeout=0;
  4. }
  5.  
  6. upstream frappe-bench-socketio-server {
  7. server 127.0.0.1:9000 fail_timeout=0;
  8. }
  9.  
  10.  
  11. server {
  12. listen 80;
  13. server_name
  14. site1.local
  15. ;
  16.  
  17. root /home/centos/frappe-bench/sites;
  18.  
  19.  
  20.  
  21. location / {
  22. try_files /site1.local/public/$uri @webserver;
  23. }
  24.  
  25. location @webserver {
  26. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  27. proxy_set_header X-Forwarded-Proto $scheme;
  28. proxy_set_header X-Frappe-Site-Name site1.local;
  29. proxy_set_header Host $host;
  30. proxy_set_header X-Use-X-Accel-Redirect True;
  31. proxy_read_timeout 120;
  32. proxy_redirect off;
  33.  
  34. proxy_pass http://frappe-bench-frappe;
  35. }
  36.  
  37. # optimizations
  38. sendfile on;
  39. keepalive_timeout 15;
  40. client_max_body_size 50m;
  41. client_body_buffer_size 16K;
  42. client_header_buffer_size 1k;
  43.  
  44. # enable gzip compresion
  45. # based on https://mattstauffer.co/blog/enabling-gzip-on-nginx-servers-including-laravel-forge
  46. gzip on;
  47. gzip_http_version 1.1;
  48. gzip_comp_level 5;
  49. gzip_min_length 256;
  50. gzip_proxied any;
  51. gzip_vary on;
  52. gzip_types
  53. application/atom+xml
  54. application/javascript
  55. application/json
  56. application/rss+xml
  57. application/vnd.ms-fontobject
  58. application/x-font-ttf
  59. application/font-woff
  60. application/x-web-app-manifest+json
  61. application/xhtml+xml
  62. application/xml
  63. font/opentype
  64. image/svg+xml
  65. image/x-icon
  66. text/css
  67. text/plain
  68. text/x-component
  69. ;
  70. # text/html is always compressed by HttpGzipModule
  71. }
Advertisement
RAW Paste Data Copied
Advertisement