1

Let's say my current website is running on machine A. I plan to launch new website on Machine B. Now I want to make this new website live to users belonging to some particular location only (IP based). This would allow us to test new site without disturbing existing setup and before making it open to all.

What kind of setup (servers/reverse proxy/IP database etc) would be recommended? Any problem with this approach (apart from redirect delay and possible SEO problems)?

Thanks for your help.

ucker
  • 245
  • 2
  • 5

2 Answers2

1

There's no shortage of options here. Pretty much every webserver I've played with has the ability to examine and act differently depending on the client IP address, and once you've got that functionality you can just route the request to different places based on the IP address rules you setup.

womble
  • 96,255
  • 29
  • 175
  • 230
0

Ok if you want a really simple solution and the list of IP users is short just use .htaccess and apache RewriteEngine on Machine A.

For example add this to your .htaccess:

RewriteCond %{REMOTE_ADDR} ^(192\.168\.0\.12)$  [OR]
RewriteCond %{REMOTE_ADDR} ^(192\.168\.0\.13)$  
RewriteRule ^(.*)$ http://other.webserver.com/$1 [P]

If not just check the documentation for apache mod_proxy.

If that's not enough you can use solutions like varnish, nginx proxy, HAproxy, but you will need to reconfigure apache on machine A and add complexity to your solution.

golja
  • 1,621
  • 10
  • 14