Skip to content

Instantly share code, notes, and snippets.

@offmessage
Created February 9, 2012 11:55
Show Gist options
  • Save offmessage/1779523 to your computer and use it in GitHub Desktop.
Save offmessage/1779523 to your computer and use it in GitHub Desktop.
Proxy traffic from old to new server to allow for smooth DNS transitions
# proxy traffic from original to new machine to allow for smooth DNS transfers
# Set new-www.therealserver.com up in /etc/hosts on the original machine
<VirtualHost *:80>
ServerName www.therealservername.com
RewriteEngine On
RewriteRule ^(.*)$ http://new-www.therealservername.com$1 [P,L]
ProxyPass / http://new-www.therealservername.com/
ProxyPreserveHost On
<Proxy *>
Allow from all
</Proxy>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment