Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Sep 2005
    Posts
    50

    Default Migrating from Apache web server to CPanel - Suggestions?

    Hello,

    I have an apache webserver with about 150 websites on it. My goal is to get these sites migrated over to CPanel. I know how to accomplish this manually, and have already backed up the data and httpd.conf file (and various other required components). The problem is, it will take me a LOT of manhouras to transfer all of these sites. Does anyone have some suggestions for automating this process so I don't have to spend my whole weekend doing it? the source server is apache 2.0.48, the destination server is WHM 10.8.0 cPanel 10.9.0-R118.

    Any help or suggestions would be highly appreciated, doing this manually is something i'd rather avoid if someone has a few scripts or suggestions that could help me out.



    Thanks!

    Nick

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by aboleth View Post
    I have an apache webserver with about 150 websites on it. My goal is to get these sites migrated over to CPanel.
    Although I have never tried this feature myself, but see if that works for you: login to WHM >> Transfers >> Copy an account from another server with account password
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  3. #3
    Member
    Join Date
    Oct 2006
    Posts
    191

    Default

    Doesn't the account to be copied need to be a cPanel site as well?

  4. #4
    Member dafut's Avatar
    Join Date
    Dec 2005
    Posts
    75

    Default

    Dang, I've been sitting here pondering this question for a few (surely not as long as you have) and all I see is a fair amount of work. Not knowing what needs to be transferred (straight html? php? databases? etc...), maybe for some sites using a recursive wget might be a good method.

    Yet still I see nothing but lots of tarballs...or a couple big tarballs...

    Best of luck to you. I had to do a similar migration a year ago but it was only about 35 sites or so--and it was still work.

  5. #5
    Member
    Join Date
    Sep 2005
    Posts
    50

    Default

    Yea, This is a tough cookie. I've already started some manual moves, and I think most of them will be simple. I would say about 75% of the sites are really simple either frontpage or php/html pages that won't pose a problem. I have run into a few problems with people who use different types of form mailers. Does anyone out there have a list of different components I should install to garuntee maximum compatibility with the sites I'm transferring? I have a site right now that wont send mail form it's form, but it's still up on the other server so I'll need to get it working before I change the dns records. I know there are a few ssl sites, and some sites that link into databases. Most of these databases are thankfully remote from the server that will be taken out of production. This should make using CPanel's MySQL optional.

    Anyhow, thanks for the replies, I'm still working on this large move - any advice anyone has to offer is highly appreciated!

    Nick

  6. #6
    Member
    Join Date
    Jan 2007
    Posts
    46

    Default

    Quote Originally Posted by aboleth View Post
    Yea, This is a tough cookie. I've already started some manual moves, and I think most of them will be simple. I would say about 75% of the sites are really simple either frontpage or php/html pages that won't pose a problem. I have run into a few problems with people who use different types of form mailers. Does anyone out there have a list of different components I should install to garuntee maximum compatibility with the sites I'm transferring? I have a site right now that wont send mail form it's form, but it's still up on the other server so I'll need to get it working before I change the dns records. I know there are a few ssl sites, and some sites that link into databases. Most of these databases are thankfully remote from the server that will be taken out of production. This should make using CPanel's MySQL optional.

    Anyhow, thanks for the replies, I'm still working on this large move - any advice anyone has to offer is highly appreciated!

    Nick
    Hi Nick,
    I'm about to take a similar plunge myself. Moving 300+ accounts from Apache Linux to CPanel at either Liquidweb or hostgator. I'm currently in planning stage so I don't have a lot of tips for you, but what are some of the concerns you have? Why is the migration of MySQL databases worrying you? I'm going to install the same or close enough version of MySQL on the server so that I can just take a dump of the databases and carry over. The privileges and passwords are stored in the database called 'mysql' so moving over that database should move over all the logins. I haven't tried this though, I'm sure there will be some issues here and there.

    Anyways, I'll send you a private msg with my e-mail, maybe we can help each other throughout our moves.

  7. #7
    Member
    Join Date
    Sep 2005
    Posts
    50

    Default

    MYSQL isn't a problem. I'm more concerned with some of the apache sites making use of components in php or using mailer components that may not exist on CPanel. I'd like to drop the sites in and not have to worry about what kind of mailer objects they use etc. I'll definately share anything I come across if it has a chance of helping anyone. For some reason my downloads using proftpd on apache are going at like 20k on a 100MB lan, so i'm trying to figure that out right now. (it's always something) Any suggestions on getting maximum compatibility for people who use forms to mail from their site?

    Thanks!

    Nick

  8. #8
    Member
    Join Date
    Jan 2007
    Posts
    46

    Default

    Quote Originally Posted by aboleth View Post
    MYSQL isn't a problem. I'm more concerned with some of the apache sites making use of components in php or using mailer components that may not exist on CPanel. I'd like to drop the sites in and not have to worry about what kind of mailer objects they use etc. I'll definately share anything I come across if it has a chance of helping anyone. For some reason my downloads using proftpd on apache are going at like 20k on a 100MB lan, so i'm trying to figure that out right now. (it's always something) Any suggestions on getting maximum compatibility for people who use forms to mail from their site?

    Thanks!

    Nick
    I'll be starting the migration soon and I also have many customers who use formmail. I think it should be fine as long as you drop the script into the same folder. For example, on my old servers it's in the users cgi-bin/ folder so I'll have to make sure it's in the cgi-bin/ folder on the new servers. If the default cgi-bin folder will be called something else, then you can create a symbolic link in linux so there's a cgi-bin folder. e.g.

    ln -s newcgifolder cgi-bin

    As for the script itself, the only variable which might be modified inside that I see is this line:

    $mailprog = '/usr/sbin/sendmail';

    Now, that's the default path for sendmail so if sendmail is installed elsewhere then you need to change. If the new servers do not use sendmail for MTA, then we got a problem. We need to install one of the form mailing script offered by Cpanel and modify the customers HTML to use the new one. For this, I would probably write a PHP script or a Unix bash script to do a string search and replace in their HTML's but more changes might be needed.

    My Cpanel server will be setup in a day or two so when that happens I'll know much better what needs to be done.

    Oh, here's a tip that might help.. I want to search for all customers that use the formmail script OR reference the secure server address secure-server.net (which is going to be changed). Just use grep as such:

    find . -name '*.html' -o -name '*.htm' -o -name '*.php' 2>/dev/null | xargs grep -i -n -l -s "formmail.cgi\|safe-order.net"

    The matches.txt file would then contain a list of all customer pages which need to be modified. If you go to your /home/www/ folder or wherever all customer home folders are stored, this should help track down which sites needs to be changed to work.
    Last edited by babakb; 01-26-2007 at 09:25 AM.

Similar Threads & Tags
Similar threads

  1. Migrating IMAP to another server-- need suggestions
    By myusername in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-08-2007, 10:09 PM
  2. Migrating 300 web sites to cPanel server
    By babakb in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 02-08-2007, 01:32 AM
  3. Suggestions learning web host managing
    By bcp1961 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-15-2003, 01:49 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube