nginx.conf 780 B

123456789101112131415161718192021222324252627282930313233343536
  1. #worker_process 2;
  2. user huginn huginn;
  3. events {
  4. worker_connections 1024;
  5. accept_mutex on;
  6. }
  7. http {
  8. types_hash_max_size 2048;
  9. include mime.types;
  10. upstream huginn_server {
  11. server unix:/home/huginn/shared/tmp/sockets/unicorn.sock;
  12. }
  13. server {
  14. listen 80;
  15. server_name _;
  16. keepalive_timeout 5;
  17. root /home/huginn/current/public;
  18. try_files $uri/index.html $uri.html $uri @app;
  19. error_page 500 502 503 504 /500.html;
  20. location = /500.html {
  21. root /home/huginn/current/public;
  22. }
  23. location @app {
  24. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25. proxy_set_header X-Forwarded-Proto $scheme;
  26. proxy_set_header Host $http_host;
  27. proxy_redirect off;
  28. proxy_pass http://huginn_server;
  29. }
  30. }
  31. }