Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

how to serve different content from two nics on the same server

$
0
0
I have an appliance with two nics and want to serve different content through each nic. One nic is private and another public and each exposes very different functionality. There are other ways to get at the eventual goal, including adding authentication for the "private" functionality but for various reasons, this is the current approach.

The best way I have found to accomplish this is by listening on the two ip addresses via "listen" directives in two different server blocks.

Is there a better way to serve different dynamic content on two nics in the same server?

The reason I ask: Listing the ip addresses thus in the configuration file necessitates an external script that automatically edits the file whenever there is an ip change. There isn't a universally reliable way to do this (I'm using if-up.d/) in linux, or is there?

Thank you for any pointers.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>