Moving webserver, conserns

Discussion in 'Server Operation' started by raypettersen, Feb 7, 2008.

  1. raypettersen

    raypettersen New Member


    I have a situation at work where we have to move one webserver with lots of websites, to a different network. I`ve connected the new network to the old one so that they can reach eachother. But the webserver is a real headache. I need some kind of rewrite rule, that will rewrite every request made to a new apache gateway, so that it points to the new server.

    Any help would be greatly appreciated.
  2. topdog

    topdog Active Member

    Why dont you use mod_proxy to proxy the requests to the new server instead or mod_rewrite ?
  3. raypettersen

    raypettersen New Member

    simply because the documentation is very extensive, and I have limited experience with this scenario.

    Could anyone please provide an example?

    I understand this can be done two ways. Directly in the vhost file, or with a .htaccess file?
  4. falko

    falko Super Moderator ISPConfig Developer

    There are some examples for a moved web server here:

    That's right.
  5. raypettersen

    raypettersen New Member

    Ok falco. Lets take an example up front.

    We have two webservers. One old, and one new.

    lets say the old server is called :
    The new server is called :

    I move a website to, create a dns record;, and point it to the new server.

    Then place a htaccess in the customers root directory with the following:

    RewriteEngine on
    RewriteRule ^/~(.+) [R,L]


    Now if someone goes to the customers webpage, they will be redirected to until they change their DNS record to the new webservers IP.

    I hope Im able to make sence. A bit complicated to explain.. =)

    will this method work?
  6. falko

    falko Super Moderator ISPConfig Developer

    Looks good. :)

Share This Page