Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- events {
- worker_connections 768;
- }
- http {
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 65;
- types_hash_max_size 2048;
- server_tokens off;
- proxy_redirect off;
- proxy_set_header Host $host;
- proxy_cache_path /tmp/nginx-cache levels=1:2 keys_zone=one:8m max_size=1000m;
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log;
- gzip on;
- gzip_disable "msie6";
- gzip_types text/plain text/xml text/css text/comma-separated-values;
- upstream unicorn {
- server unix:/tmp/unicorn.thumbs.sock fail_timeout=0;
- }
- server {
- listen 80;
- return 301 https://$host$request_uri;
- }
- server {
- listen 443;
- server_name mydomain.com;
- root /home/deploy/myapp/public;
- ssl on;
- ssl_certificate /home/deploy/myapp/ssl/thumbsofeurope.crt;
- ssl_certificate_key /home/deploy/myapp/ssl/thumbsofeurope.key;
- ssl_session_timeout 5m;
- ssl_protocols SSLv2 SSLv3 TLSv1;
- ssl_ciphers HIGH:!aNULL:!MD5;
- ssl_prefer_server_ciphers on;
- charset utf-8;
- try_files $uri/index.html $uri @unicorn;
- location @unicorn {
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $http_host;
- proxy_redirect off;
- proxy_pass http://unicorn;
- proxy_cache one;
- proxy_cache_valid 200 302 1m;
- proxy_cache_valid 404 1m;
- }
- }
- error_page 500 502 503 504 /500.html;
- client_max_body_size 20M;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement