B
B
Bernard Krapivin2016-12-24 16:20:07
Nginx
Bernard Krapivin, 2016-12-24 16:20:07

How to set up sites-enabled in nginx so that it can switch ports?

In general, there is a site, it works on meteor, the meteor occupies port :3000 at startup , the question is how to make it so that when the meteor is running, the site includes this port:

server {
  location / {
    proxy_pass http://localhost:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
  }
}

And when the meteor is NOT working, does it turn on its standard port?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2016-12-24
@Bobrodon

nginx.org/ru/docs/http/ngx_http_upstream_module.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question