Completely new to nginx, coming from Apache.
I have a simple multiple proxy to nodejs setup put together from a few online resources and the config looks like this:
server{
listen 80;
server_name dev1.domain.net;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
location / {
proxy_pass http://127.0.0.1:3000;
}
location /other {
proxy_pass http://127.0.0.1:3001;
}
}
Each new reverse proxy I have added as a new location.
Coming from apache, it feels a little too easy...
Is this the most efficient & recommended way of creating new reverse proxies in a single file?