My question is how to get Nginx to redirect the domain (www.example.com) to the meteor application on the same server without ssl.
Details here: I'm trying to use Nginx to host an application made by a meteor on my own server. I checked a ton of various configuration files that I found on the Internet (most of which are outdated), but I cannot get Nginx to redirect my domain name to port 3000, where a meteor can pick it up and process a page.
The latest configuration for Nginx for the proxy port:
upstream default {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://default/;
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;
}
}
I changed it a bit to what I think is right for my installation. I use the default configuration file in Nginx, and I created the meteor application in / usr / share / nginx / html using "meteor create html".
, , meteor .
: meteor, nodejs, mongodb nginx.
nginx, , SSL, . , , .
- , , Nginx meteor www.example.com:3000?
.
P.S.
, VM, . , .