Created
April 26, 2014 09:46
-
-
Save rs77/11315966 to your computer and use it in GitHub Desktop.
Current process in deploying a Meteor app to my own server: 1. Edit meteor.sh file for app name and port number (must be a unique port number that isn't used); 2. run `./meteor.sh deploy` in folder; 3. once done access server and create/modify the new app's nginx config file
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
upstream app_name { | |
server localhost:PORT; # PORT being the unique port number assigned in the meteor.sh file | |
} | |
server { | |
listen 80; | |
server_name domain.com www.domain.com; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_pass http://app_name; # from name given to the upstream area above | |
proxy_redirect off; | |
# these are needed for websocket support | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment