I changed the sites-avaliable config for a domain. How do I prevent override

  • After an upgrade to Ubuntu 16.04 a number of sites stopped working due to incompatibility with PHP 7. After a number of attempts to install both PHP 5.6 and PHP 7.0 I succeeded.


    By default, sites are running PHP 7.0. In order to switch specific domains back to 5.6, I added the following line in the file
    /etc/apache2/sites-available/[my.client.domain].conf

    Code
    1. AddHandler application/x-httpd-php56 .php

    The way I understand, this file will be overwritten the next time the configuration files are rebuilt.


    How do I make changes to the domain so that they will survive being rebuilt.

  • @crafter


    Best would be to buy the PhpSwitcher plugin but if you like to complicate your life, feel free ;)


    You cannot prevent the vhosts to be regenerated on a domain change and/or i-MSCP update/reconfiguration. However, you can add that directive in the static configuration files that live in the /etc/apache2/imscp directory. There is one configuration file per site that is included in the main vhost file of the site. These files are never touched by i-MSCP.


    BTW: Be aware that you'll not get any support if you have any problem regarding your PHP applications.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206