Forum Moderators: phranque
I modified httpd.include to add that line.
Any suggestions? I have root access to the server.
Make the old site non-writeable by users (disable all dynamic content addition, forum posting, cart functionality, etc), and add a note to explain the upgrade.
Get the site online at new IP.
Change the DNS entries.
Allow a few hours to days for everyone to be able to see the new site. Meanwhile, they can still read the old site, but not interact with it.
Extra optional step, temporarily set up the server on the old IP as a proxy for the new IP, accepting requests for the domain name and forwarding them to the direct IP of the new server. This will mess with your site stats and logging, but users will 'see' the new site immediately and the DNS change (when it happens) will result only in a few minutes of outage.
After a few days, change the TTL value back to whatever it previously was.
I did that and restarted httpd but I still cannot have the server to direct requests of the old IP to the server, so I am certainly doing something wrong.
This requires that you keep the old IP address for a time, and that you implement either a 302-Found redirect or a reverse-proxy through-put from the old IP address to the new IP address as g1smd described. After the DNS change has fully propagated, you can then release the old IP address and remove the redirect/proxy code.
Jim
I need to tell Plesk to send the requests to old IP to the new IP for those who did not catch the change yet.
Is this even possible?
That would be the 'proxy' solution that was mentioned above.
However it's almost too late to be changing things around, because you have already proceeded to step 4 without doing step 1 or 2.
But in the future, it is possible, just not using the simple functions provided by Plesk or other control panels.
You can easily redirect or proxy requests arriving at the old IP address to the new IP address by simply checking the requested hostname in the HTTP request (in the Host header). If the request arrives at old-IP for old-Hostname, then redirect/proxy it to new-IP. If the request is for a different hostname, then leave the request alone.
Three lines of mod_rewrite code in .htaccess will do it either way. If the code is in a server config file, then it only takes two (since the server context is already established by which vHost container it's in).
Jim