Re: Serve different pages for different IP

2014-12-24 Thread Francis Daly
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_roo

Re: Serve different pages for different IP

2014-12-24 Thread magal
Thank you. My configurations were: 1. root /path_to_root1; if ($remote_addr = xx.xx.xx.xx) { set $document_root /path_to root2; } 2. map $remote_addr $document_root { default /path_to_root1; xx.xx.xx.xx /path_to root2; } 3. geo $document_root { default /path_to_root1; xx.xx.xx

Re: Serve different pages for different IP

2014-12-23 Thread Francis Daly
On Tue, Dec 23, 2014 at 05:58:00AM -0500, magal wrote: Hi there, > I have one domain and I want to serve different pages based on the Client > IP. > > Nginx refuse different server with same server_name and both location must > be / . > > Can you help me? Set a variable based on the client IP

Serve different pages for different IP

2014-12-23 Thread magal
I have one domain and I want to serve different pages based on the Client IP. Nginx refuse different server with same server_name and both location must be / . Can you help me? Tnk Posted at Nginx Forum: http://forum.nginx.org/read.php?2,255744,255744#msg-255744 _