ngx_test.conf 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. server {
  2. listen 8079;
  3. client_max_body_size 4G;
  4. server_name stateadmin.hiwavo.com;
  5. #keepalive_timeout 5;
  6. access_log /home/rails/fohow/state_admin/log/ngx_access.log main;
  7. error_log /home/rails/fohow/state_admin/log/ngx_error.log;
  8. error_page 500 502 503 504 /50x.html;
  9. location = /500.html {
  10. root /home/rails/fohow/state_admin/public;
  11. }
  12. error_page 404 /404.html;
  13. location = /404.html {
  14. root /home/rails/fohow/state_admin/public;
  15. }
  16. root /home/rails/fohow/state_admin/public;
  17. location / {
  18. #allow 113.106.106.3;
  19. #allow 113.106.106.2;
  20. #deny all;
  21. proxy_redirect off;
  22. proxy_set_header Host $host;
  23. proxy_set_header X-Real-IP $remote_addr;
  24. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25. proxy_pass http://127.0.0.1:6874;
  26. }
  27. # static resource routing - both assets folder and favicon.ico
  28. location ~* ^/a2ssets/|favicon.ico {
  29. # Per RFC2616 - 1 year maximum expiry
  30. # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
  31. expires 1y;
  32. add_header Cache-Control public;
  33. # Some browsers still send conditional-GET requests if there's a
  34. # Last-Modified header or an ETag header even if they haven't
  35. # reached the expiry date sent in the Expires header.
  36. add_header Last-Modified "";
  37. add_header ETag "";
  38. break;
  39. }
  40. }