How to deploy a Meteor application with SSL on Nginx --> https://github.com/LeCoupa/awesome-cheatsheets
# Note: if you want to run multiple meteor apps on the same server, | |
# make sure to define a separate port for each. | |
# Upstreams | |
upstream gentlenode { | |
server 127.0.0.1:58080; | |
} | |
# HTTP Server | |
server { | |
listen 0.0.0.0:80; | |
server_name gentlenode.com; | |
rewrite ^ https://$server_name$request_uri permanent; | |
} | |
# HTTPS Server | |
server { | |
listen 443; | |
server_name gentlenode.com; | |
root /srv/data_studio/web/gentlenode.com; | |
error_log /var/log/nginx/gentlenode.com.log crit; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/gentlenode.com.crt; | |
ssl_certificate_key /etc/nginx/ssl/gentlenode.com.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE | |
location / { | |
proxy_pass http://gentlenode/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forward-Proto http; | |
proxy_set_header X-Nginx-Proxy true; | |
proxy_redirect off; | |
} | |
} |
This comment has been minimized.
This comment has been minimized.
Weird. With this setup, meteor mobile apps (Android & iOS) cannot connect to server anymore... and built with --server https://server_name also tried with and export DDP_DEFAULT_CONNECTION_URL and ROOT_URL... It's a complete no go... :-( |
This comment has been minimized.
This comment has been minimized.
@teknologist - did you ever work it out? |
This comment has been minimized.
This comment has been minimized.
@teknologist I got the same issue. Is this a Meteor bug? |
This comment has been minimized.
This comment has been minimized.
I got the same issue.! |
This comment has been minimized.
This comment has been minimized.
--mobile-server misite.com:3000 on nginx redirecto to http://localhost:3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Now Meteor Up has the SSL support built in. So, you might find it useful :)