Last active
December 22, 2015 10:19
-
-
Save sei0o/ab0ef45cf575e2c70d8d to your computer and use it in GitHub Desktop.
supervisorとpumaとnginx(SSL)のconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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