Serve different pages for different IP

Francis Daly francis at
Wed Dec 24 15:47:14 UTC 2014

On Wed, Dec 24, 2014 at 10:16:28AM -0500, magal wrote:

Hi there,

> My configuration would be to have one document_root for a specific IP and
> another for the rest of the world.

In each case, do not set $document_root.

Instead, set $my_root_var (for example). Then separately, do

  root $my_root_var;

Francis Daly        francis at

More information about the nginx mailing list