The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Migrating from Apache web server to CPanel - Suggestions?

Discussion in 'EasyApache' started by aboleth, Jan 19, 2007.

  1. aboleth

    aboleth Well-Known Member

    Joined:
    Sep 8, 2005
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    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. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    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
     
  3. Fernis

    Fernis Well-Known Member

    Joined:
    Oct 28, 2006
    Messages:
    192
    Likes Received:
    1
    Trophy Points:
    18
    Doesn't the account to be copied need to be a cPanel site as well?
     
  4. dafut

    dafut Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    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. aboleth

    aboleth Well-Known Member

    Joined:
    Sep 8, 2005
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    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. babakb

    babakb Well-Known Member

    Joined:
    Jan 20, 2007
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    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. aboleth

    aboleth Well-Known Member

    Joined:
    Sep 8, 2005
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    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. babakb

    babakb Well-Known Member

    Joined:
    Jan 20, 2007
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
    #8 babakb, Jan 26, 2007
    Last edited: Jan 26, 2007
Loading...

Share This Page