Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. worker_processes 1;
  2.  
  3. events {
  4.  
  5. worker_connections 1024;
  6.  
  7. }
  8.  
  9. http {
  10.  
  11. sendfile on;
  12.  
  13. gzip on;
  14. gzip_http_version 1.0;
  15. gzip_proxied any;
  16. gzip_min_length 500;
  17. gzip_disable "MSIE [1-6]\.";
  18. gzip_types text/plain text/xml text/css
  19. text/comma-separated-values
  20. text/javascript
  21. application/x-javascript
  22. application/atom+xml;
  23.  
  24. # Configuration containing list of application servers
  25. upstream app_servers {
  26.  
  27. server 127.0.0.1:8080;
  28. # server 127.0.0.1:8081;
  29. # ..
  30. # .
  31.  
  32. }
  33.  
  34. # Configuration for Nginx
  35. server {
  36.  
  37. # Running port
  38. listen 80;
  39.  
  40. # Settings to serve static files
  41. location ^~ /static/ {
  42.  
  43. # Example:
  44. # root /full/path/to/application/static/file/dir;
  45. root /app/static/;
  46.  
  47. }
  48.  
  49. # Serve a static file (ex. favico)
  50. # outside /static directory
  51. location = /favico.ico {
  52.  
  53. root /app/favico.ico;
  54.  
  55. }
  56.  
  57. # Proxy connections to the application servers
  58. # app_servers
  59. location / {
  60.  
  61. proxy_pass http://app_servers;
  62. proxy_redirect off;
  63. proxy_set_header Host $host;
  64. proxy_set_header X-Real-IP $remote_addr;
  65. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  66. proxy_set_header X-Forwarded-Host $server_name;
  67.  
  68. }
  69. }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement