Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. events {
  2. worker_connections 768;
  3. }
  4.  
  5. http {
  6. sendfile on;
  7. tcp_nopush on;
  8. tcp_nodelay on;
  9. keepalive_timeout 65;
  10. types_hash_max_size 2048;
  11. server_tokens off;
  12.  
  13. proxy_redirect off;
  14. proxy_set_header Host $host;
  15. proxy_cache_path /tmp/nginx-cache levels=1:2 keys_zone=one:8m max_size=1000m;
  16.  
  17.  
  18. include /etc/nginx/mime.types;
  19. default_type application/octet-stream;
  20.  
  21. access_log /var/log/nginx/access.log;
  22. error_log /var/log/nginx/error.log;
  23.  
  24. gzip on;
  25. gzip_disable "msie6";
  26. gzip_types text/plain text/xml text/css text/comma-separated-values;
  27.  
  28. upstream unicorn {
  29. server unix:/tmp/unicorn.thumbs.sock fail_timeout=0;
  30. }
  31.  
  32. server {
  33. listen 80;
  34. return 301 https://$host$request_uri;
  35. }
  36.  
  37.  
  38. server {
  39. listen 443;
  40. server_name mydomain.com;
  41. root /home/deploy/myapp/public;
  42. ssl on;
  43. ssl_certificate /home/deploy/myapp/ssl/thumbsofeurope.crt;
  44. ssl_certificate_key /home/deploy/myapp/ssl/thumbsofeurope.key;
  45. ssl_session_timeout 5m;
  46.  
  47. ssl_protocols SSLv2 SSLv3 TLSv1;
  48. ssl_ciphers HIGH:!aNULL:!MD5;
  49. ssl_prefer_server_ciphers on;
  50.  
  51. charset utf-8;
  52.  
  53. try_files $uri/index.html $uri @unicorn;
  54. location @unicorn {
  55. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  56. proxy_set_header Host $http_host;
  57. proxy_redirect off;
  58. proxy_pass http://unicorn;
  59. proxy_cache one;
  60. proxy_cache_valid 200 302 1m;
  61. proxy_cache_valid 404 1m;
  62. }
  63. }
  64.  
  65. error_page 500 502 503 504 /500.html;
  66. client_max_body_size 20M;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement