Skip to content

Instantly share code, notes, and snippets.

@v1nc3ntlaw
Created December 11, 2013 07:56
Show Gist options
  • Save v1nc3ntlaw/7906573 to your computer and use it in GitHub Desktop.
Save v1nc3ntlaw/7906573 to your computer and use it in GitHub Desktop.
Passenger Standalone with Nginx
-----
command
passenger start -S /tmp/s.dev.socket -d
nginx config example
upstream s_dev_server {
server unix:/tmp/s.dev.socket fail_timeout=0;
}
server {
listen 8080;
server_name s.dev;
root /Users/home/projects/kickass/public;
access_log /Users/home/projects/kickass/log/access.log;
error_log /Users/home/projects/kickass/log/error.log;
try_files $uri/index.html $uri.html $uri @app;
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://s_dev_server;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment