migrating from apache to nginix-php-fpm

Discussion in 'Installation/Configuration' started by maumar, May 24, 2012.

  1. maumar

    maumar Member HowtoForge Supporter

    hello there
    i have a server on a multiserver infrastructure with apache+php.
    At the moment it unused.
    Now i was attracted by perfect-server-debian-squeeze-debian-6.0-with-bind-dovecot-and-nginx-ispconfig-3
    I decided to give a try.
    I have purged apache and installed nginx and all the other stuff.
    At the moment to install ispconfig i realized that this box is part of a multiserver installation.
    This is and should be upgraded to
    What do u suggest? to unistall ispconfig and re-install it so the new installation will detect nginix as explained on howto?
    Or trying the upgrade to
    I would add that if this server will be removed by server table on master server is not an issue, i can rename the server and add it again with another hostname
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig has to be reinstalled, a update would not work. If the server contained already some websites then a ispconfig reinstall without a complete server reinstall will most likely not work as a server that has already sites can not be migrated from apache to nginx as the overalls etp of php and sites is very different.
  3. maumar

    maumar Member HowtoForge Supporter

    let mysql 5.1 or upgrade to mysql 5.5?

    Ok, i unistalled and re-installed, all went well :)
    now i have another issue, and I ask u a suggestion:
    here it is apt-get output in the monitor:

    Reading package lists...
    Building dependency tree...
    Reading state information...
    The following packages will be REMOVED:
    mysql-client-5.1 mysql-server mysql-server-5.1
    The following NEW packages will be installed:
    libaio1 mysql-client-5.5
    The following packages will be upgraded:
    mysql-client mysql-server-core-5.1
    2 upgraded, 2 newly installed, 3 to remove and 0 not upgraded.
    Remv mysql-server [5.1.61-0+squeeze1]
    Remv mysql-server-5.1 [5.1.61-0+squeeze1]
    Inst mysql-client [5.1.61-0+squeeze1] (5.5.24-1~dotdeb.1 packages.dotdeb.org:stable [all]) []
    Remv mysql-client-5.1 [5.1.61-0+squeeze1] []
    Inst mysql-client-5.5 (5.5.24-1~dotdeb.1 packages.dotdeb.org:stable [amd64])
    Inst mysql-server-core-5.1 [5.1.61-0+squeeze1] (5.1.62-1~dotdeb.0 packages.dotdeb.org:stable [amd64])
    Inst libaio1 (0.3.107-7 Debian:6.0.5/stable [amd64])
    Conf mysql-client-5.5 (5.5.24-1~dotdeb.1 packages.dotdeb.org:stable [amd64])
    Conf mysql-client (5.5.24-1~dotdeb.1 packages.dotdeb.org:stable [all])
    Conf mysql-server-core-5.1 (5.1.62-1~dotdeb.0 packages.dotdeb.org:stable [amd64])
    Conf libaio1 (0.3.107-7 Debian:6.0.5/stable [amd64])
    For nginix dot-deb is necessary, as u pointed out in your howto.
    Issuing apt-get upgrade in ssh iI get simply:
    apt-get upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages have been kept back:
      mysql-client mysql-client-5.1 mysql-server mysql-server-5.1 mysql-server-core-5.1
    0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
    what do u suggest? I keep mysql 5.1 or i try to remove it?
    In this case i have to remove and reinstall, i tried to upgrading but i got:

    apt-get install  mysql-client mysql-client-5.1 mysql-server mysql-server-5.1 mysql-server-core-5.1
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    The following packages have unmet dependencies:
     mysql-client : Depends: mysql-client-5.5 but it is not going to be installed
     mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
    E: Broken packages
    i fixed it with:
    apt-get -f install
  4. arraken

    arraken Member HowtoForge Supporter

    Hi all,
    i’ve already read in the forums that it’s not „easily“ possible to switch from ispconfig 3 with apache to ispconfig 3 with nginx and php-fpm, but if I still wanted to do it, how should I proceed? This is what I have in mind:

    I have a server running with ispconfig 3 and apache. It’s a live-server with around 10 clients on it, with around 20 domains and the same amount of email-accounts. I know that I can not simply uninstall apache and install nginx because of the different configuration files of the existing sites etc. But what if I did the following:

    1. Backup the www directory and all db’s (of course.. :) )
    2. Uninstall apache and php
    3. Uninstall ispconfig 3
    4. Install nginx and php-fpm
    5. Reinstall ispconfig 3
    6. create all client accounts from scratch in ispconfig (including websites, ftp accounts email and databases)
    7. copy the backed up content of the www directory to the according folders created by ispconfig with nginx

    Do you think this could work? Or is it much more complicated than that?
    Another problem that I would have to tackle is e-mail: the login information would have to stay the same for my customers. Is there some way to import the e-mail settings of my clients into the new isp-config installation, after I’ve created the clients and domains the same way they were in the old ispconfig installation?

    I’m thinking of trying this out on a test-platform (which I would have to set up first). But before I do that, I wanted to know if it’s possible at all, of if it’s a waste of my time and too complicated. Or if there’s a better and faster way than the one I described.

    I would be grateful for any answers or tips! :)
  5. falko

    falko Super Moderator ISPConfig Developer

    Basically this could work, but you'd also have to modify the server table in the ISPConfig database so that ISPConfig knows it's using nginx.

    Personally, I'd set up the system from scratch again as it doesn't seem to be much more work than the procedure you described, and you have a clean system that will work with nginx.

Share This Page