Skip to content

Instantly share code, notes, and snippets.

@sei0o
Last active December 22, 2015 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sei0o/ab0ef45cf575e2c70d8d to your computer and use it in GitHub Desktop.
Save sei0o/ab0ef45cf575e2c70d8d to your computer and use it in GitHub Desktop.
supervisorとpumaとnginx(SSL)のconfig
root = Dir.getwd.to_s
bind "unix://#{root}/tmp/puma/socket"
pidfile "#{root}/tmp/puma/pid"
state_path "#{root}/tmp/puma/state"
rackup "#{root}/config.ru"
threads 4, 8
activate_control_app
upstream app {
server unix:///var/www//tmp/puma/socket;
}
server {
listen 80;
server_name webapp.xyz;
root /var/www/webapp/public;
location / {
try_files $uri @puma;
}
location @puma {
include proxy_params;
proxy_pass http://app;
}
}
[program:webapp]
directory=/var/www/webapp
command=puma --config puma.rb
autostart=true
autorestart=true
user=nginx
redirect_stderr = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment