[Nginx]unicorn設定

LINEで送る
Pocket

upstream unicorn {
  server unix:/var/www/xxxxxx/shared/tmp/sockets/unicorn.sock;
}

server {
    listen 80;
    server_name adachin.jp;
    root /var/www;

    location /ping.html {
      root /var/www/current/public;
    }

    location / {
        proxy_pass http://unicorn;
        proxy_set_header    Host                $http_host;
        proxy_set_header    X-Real-IP           $remote_addr;
        proxy_set_header    X-Forwarded-Ssl     on;
        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
        proxy_set_header    X-Forwarded-Proto   https;
        proxy_set_header    X-Frame-Options     SAMEORIGIN;
        proxy_set_header    X-Sendfile-Type     X-Accel-Redirect;

    }

    access_log /var/log/nginx/access.log main;
    error_log  /var/log/nginx/error.log warn;
}

 

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *