Nginx as Reverse Proxy for multiple servers binded to proxy using UNIX sockets - how to reached in LAN

Reinis Rozitis r at roze.lv
Wed Oct 3 00:09:07 UTC 2018


> so all goes in the same nginx.conf but in different http{} block or do I need one nginx.conf  for each, the user unix sockets and also the parent proxy server?

A typical nginx configuration has only one http {} block.

You can look at some examples:
https://nginx.org/en/docs/http/request_processing.html
https://nginx.org/en/docs/http/server_names.html 
https://www.nginx.com/resources/wiki/start/topics/examples/server_blocks/


> You suggesting to setup virtualhosts what listen to a port whereto traffic is forwarded from the router. I don't to have multiple ports open at the router, so I would like to stick with UNIX Sockets and proxy.

Unless by "router" you mean the same Synology box you can't proxy unix sockets over TCP, they work only inside a single server/machine.

Also you don't need to forward multiple ports, just 80 and 443 (if ssl) and have name-based virtualhosts.

rr



More information about the nginx mailing list