how to serve different content from two nics on the same server
March 04, 2014 01:59AM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready