Advertisement
Guest User

dominodomino

a guest
Feb 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. worker_processes 1;
  2.  
  3. events { worker_connections 1024; }
  4.  
  5. http {
  6.  
  7. sendfile on;
  8.  
  9. gzip on;
  10. gzip_http_version 1.0;
  11. gzip_proxied any;
  12. gzip_min_length 500;
  13. gzip_disable "MSIE [1-6]\.";
  14. gzip_types text/plain text/xml text/css
  15. text/comma-separated-values
  16. text/javascript
  17. application/x-javascript
  18. application/atom+xml;
  19.  
  20.  
  21. # Configuration for the server
  22. server {
  23.  
  24. access_log /var/log/nginx/access.log;
  25. error_log /var/log/nginx/error.log;
  26.  
  27. # Running port
  28. listen 80;
  29.  
  30. # Proxying the connections connections
  31. location / {
  32. proxy_pass http://127.0.0.1:4000;
  33. proxy_redirect off;
  34. proxy_set_header Host $host;
  35. proxy_set_header X-Real-IP $remote_addr;
  36. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  37. proxy_set_header X-Forwarded-Host $server_name;
  38. }
  39.  
  40. location /__webpack_hmr {
  41. proxy_pass http://127.0.0.1:4005;
  42. proxy_http_version 1.1;
  43. proxy_set_header Upgrade $http_upgrade;
  44. proxy_set_header Connection “upgrade”;
  45.  
  46. }
  47.  
  48. location /assets {
  49. try_files $uri $uri/ @proxy;
  50. }
  51.  
  52. location @proxy {
  53. proxy_pass http://127.0.0.1:4005;
  54. proxy_http_version 1.1;
  55. proxy_set_header Upgrade $http_upgrade;
  56. proxy_set_header Connection “upgrade”;
  57. proxy_set_header Host $host ;
  58. proxy_set_header X-Real-IP $remote_addr;
  59. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  60. proxy_redirect off;
  61. }
  62. }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement