Nginx is able to run several servers. So far I've put 2 WordPress sites on the same server and they run well over LAN. Something like 192.168.1.5:80 and 192.168.1.5:81. On a router level external port 80 is forwarded to both: 80 and 81 of the same server.
The problem is domains - how to feed to Nginx that on request http://www.domain1.com it has to bring up website1, but on www.domain2. - website2 ???
On Synology devices that is done via Virtual Hosts. I found that on Nginx something similar is related to
etc/nginx/sites-available/openmediavault-nginx file. At least Nginx writes data of both websites into this file. Now the file of mine looks like this:
But right now Nginx brings up only first (the oldest) site on both domain requests. What should I do to have it working right?