Last active
August 29, 2015 14:23
-
-
Save strikeout/6bddcd68368eeca115f2 to your computer and use it in GitHub Desktop.
Nginx vhost config for Meteor with working websockets
This file contains hidden or 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
server { | |
server_name thomassteinhauer.com; | |
location / { | |
root /var/www/app/bundle/; | |
} | |
location /admin { | |
root /var/www/admin/bundle/; | |
} | |
# ENV | |
passenger_env_var ROOT_URL http://thomassteinhauer.com; | |
passenger_env_var MONGO_URL mongodb://127.0.0.1/app; | |
# passenger | |
passenger_enabled on; | |
passenger_app_type node; | |
passenger_startup_file bundle/main.js; | |
passenger_friendly_error_pages on; | |
passenger_sticky_sessions on; | |
passenger_sticky_sessions_cookie_name sticky; | |
# proper websocket handling | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
passenger_env_var PATH /usr/bin/; | |
passenger_env_var _PASSENGER_NODE_CONTROL_SERVER 1; | |
} |
This file contains hidden or 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
# we want one process per core | |
passenger_min_instances 1; | |
passenger_max_pool_size 1; | |
# passenger global config | |
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini; | |
passenger_ruby /usr/bin/ruby; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment