[Nginx]puma設定

LINEで送る
Pocket

upstream puma {
  server unix:/var/www/hoge/tmp/sockets/puma.sock;
}
server {
    listen 80;
    server_name hoge.com;
    location / {
        proxy_pass http://puma;
        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 *