Unable to deactivate a domain, still active

Discussion in 'Installation/Configuration' started by DDArt, Jun 24, 2025.

  1. DDArt

    DDArt Member

    I attempted to run /usr/local/ispconfig/server/scripts/ispconfig_update.sh --force and reconfigure all but when I login to admin portal, go to a domain i.e. domain1.com and click/uncheck "Active" it still shows up.

    Tried to look for the files and what's in them and where they are:
    sudo find /etc/ -type f -iname "*.*" -exec grep -l 'domain1.com' {} \;
    /etc/apache2/sites-enabled/100-domain1.com.vhost
    /etc/apache2/sites-enabled/100-lp.domain1.com.vhost
    /etc/apache2/sites-available/lp.domain1.com.vhost
    /etc/apache2/sites-available/domain1.com.vhost
    /etc/rspamd/local.d/users/domain1.com.conf
    /etc/php/7.4/fpm/pool.d/web11.conf
    /etc/php/7.4/fpm/pool.d/web2.conf
    /etc/awstats/awstats.lp.domain1.com.conf

    upload_2025-6-23_18-25-30.png
    As a test, I had a domain2.com active, and checked where it appears.
    sudo find /etc/ -type f -iname "*.*" -exec grep -l 'domain2.com.com' {} \;
    /etc/apache2/sites-enabled/100-domain2.com.com.vhost
    /etc/apache2/sites-available/domain2.com.com.vhost
    /etc/php/7.4/fpm/pool.d/web29.conf
    /etc/awstats/awstats.domain2.com.com.conf

    I went and deactivated it.
    After it completed...
    upload_2025-6-23_18-27-55.png

    and I get the same output.
    sudo find /etc/ -type f -iname "*.*" -exec grep -l 'domain2.com' {} \;
    /etc/apache2/sites-enabled/100-domain2.com.vhost
    /etc/apache2/sites-available/domain2.com.vhost
    /etc/php/7.4/fpm/pool.d/web29.conf
    /etc/awstats/awstats.domain2.com.conf

    I went into /etc/apache2/sites/enabled/
    rm domain1.com.vhost

    Domain still shows, went into ISPCONFIG, re-enabled the domain, waited 30 seconds, disabled the domain.
    Domain still visible, attempted restart apache, reload, and icognito, anything I can attempt to do to get this working?

    edit/later:
    ls -la /etc/apache2/sites-enabled/ | grep domain1
    -rw-r--r-- 1 root root 8845 Jun 20 22:19 100-lp.domain1.com.vhost
    -rw-r--r-- 1 root root 8826 Jun 20 22:19 100-domain1.com.vhost
    danny@s4:/etc/apache2/sites-available$ sudo apache2ctl -S | grep domain1
    port 80 namevhost lp.domain1.com (/etc/apache2/sites-enabled/100-lp.domain1.com.vhost:7)
    port 80 namevhost domain1.com (/etc/apache2/sites-enabled/100-domain1.com.vhost:7)
    alias www.domain1.com
    port 443 namevhost lp.domain1.com (/etc/apache2/sites-enabled/100-lp.domain1.com.vhost:126)
    port 443 namevhost domain1.com (/etc/apache2/sites-enabled/100-domain1.com.vhost:127)
    alias www.domain1.com
    apache2ctl -S | grep domain1
    port 80 namevhost lp.domain1.com (/etc/apache2/sites-enabled/100-lp.domain1.com.vhost:7)
    port 443 namevhost lp.domain1.com (/etc/apache2/sites-enabled/100-lp.domain1.com.vhost:126)
    Removing:
    sudo rm /etc/apache2/sites-enabled/100-domain1.com.vhost, does remove it and get a ssl error,


    Thanks,
     
    Last edited: Jun 24, 2025
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. till

    till Super Moderator Staff Member ISPConfig Developer

    That#s expected that you get a SSL error as you still point the domain to the server in DNS, so you must get that error as you get a different site now. Also described in the read before posting post.
     
  4. DDArt

    DDArt Member

    Thank you for the feedback, I enabled debug,

    Kept getting this:
    /usr/local/ispconfig/server/server.sh
    24.06.2025-05:15 - DEBUG [plugins.inc:155] - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    24.06.2025-05:15 - DEBUG [server:224] - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished server.php.

    Couldn't locate the .ispconfig_lock but cleaned directory and reboot and after slightly more info on 2nd run

    ==============================================
    root@s4:/usr/local/ispconfig/server# /usr/local/ispconfig/server/server.sh
    24.06.2025-05:22 - DEBUG [plugins.inc:155] - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.4/cgi/php.ini, mode fast-cgi vers 0.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/7.4/fpm/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.4/fpm/php.ini, mode php-fpm vers 0.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/7.4/cgi/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.4/cgi/php.ini, mode vers 0.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/5.6/cgi/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/5.6/cgi/php.ini, mode fast-cgi vers 1.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/5.6/fpm/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/5.6/fpm/php.ini, mode php-fpm vers 1.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/7.0/cgi/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.0/cgi/php.ini, mode fast-cgi vers 2.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/7.0/fpm/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.0/fpm/php.ini, mode php-fpm vers 2.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/7.1/cgi/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.1/cgi/php.ini, mode fast-cgi vers 3.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/7.1/fpm/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.1/fpm/php.ini, mode php-fpm vers 3.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/7.2/cgi/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.2/cgi/php.ini, mode fast-cgi vers 4.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/7.2/fpm/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.2/fpm/php.ini, mode php-fpm vers 4.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/7.3/cgi/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.3/cgi/php.ini, mode fast-cgi vers 5.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/7.3/fpm/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/7.3/fpm/php.ini, mode php-fpm vers 5.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/8.0/cgi/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/8.0/cgi/php.ini, mode fast-cgi vers 7.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/8.0/fpm/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/8.0/fpm/php.ini, mode php-fpm vers 7.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/8.1/cgi/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/8.1/cgi/php.ini, mode fast-cgi vers 8.
    24.06.2025-05:22 - DEBUG [system.inc:2539] - safe_exec cmd: grep ^opcache.validate_root '/etc/php/8.1/fpm/php.ini' - return code: 0
    24.06.2025-05:22 - DEBUG [webserver plugin.inc:181] - Info: PHP.ini changed: /etc/php/8.1/fpm/php.ini, mode php-fpm vers 8.
    24.06.2025-05:22 - DEBUG [server:224] - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished server.php.

    Later did some GUI changes and pending 4 changes, now I re-ran the ./server.sh and got:

    have new mail in /var/mail/root
    root@s4:/usr/local/ispconfig/server# /usr/local/ispconfig/server/server.sh
    PHP Warning: symlink(): File exists in /usr/local/ispconfig/server/plugins-available/apps_vhost_plugin.inc.php on line 151
    PHP Warning: symlink(): File exists in /usr/local/ispconfig/server/plugins-available/apps_vhost_plugin.inc.php on line 151
    PHP Warning: symlink(): File exists in /usr/local/ispconfig/server/plugins-available/apps_vhost_plugin.inc.php on line 151

    151 line has the following:
    -
    symlink($vhost_conf_dir.'/apps.vhost', $vhost_conf_enabled_dir.'/000-apps.vhost');

    Have the following two files:
    ./etc/apache2/sites-enabled/000-ispconfig.vhost
    ./etc/apache2/sites-enabled/000-apps.vhost
    Noticed my older host I had awhile back had a sym link and this one does not.

    4.0K -rw-r--r-- 1 root root 3.3K Jun 20 23:36 000-apps.vhost
    0 lrwxrwxrwx 1 root root 35 Feb 13 2023 000-default.conf -> ../sites-available/000-default.conf
    0 lrwxrwxrwx 1 root root 43 Feb 13 2023 000-ispconfig.conf -> /etc/apache2/sites-available/ispconfig.conf

    --------------------------------
    A much older setup I looked up for differences,

    0 lrwxrwxrwx 1 nobody users 39 Sep 17 2020 000-apps.vhost -> /etc/apache2/sites-available/apps.vhost
    0 lrwxrwxrwx 1 nobody users 35 Sep 17 2020 000-default.conf -> ../sites-available/000-default.conf
    0 lrwxrwxrwx 1 nobody users 43 Sep 17 2020 000-ispconfig.conf -> /etc/apache2/sites-available/ispconfig.conf
    0 lrwxrwxrwx 1 nobody users 44 Sep 17 2020 000-ispconfig.vhost -> /etc/apache2/sites-available/ispconfig.vhost

    I fixed some of the sym links to the apps.vhost, ispconfig.vhost and such and got might be on the right track.sudo /usr/local/ispconfig/server/server.sh
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.vhost:7
    Syntax OK
    finished server.php.

    I also confirmed that enabling the domain1 now I see the symlink coming, disabled it and the symlink goes away and is working as expected. Now I have to address why the other sites have lost its symlink and now they have a static placement and once I enable/disable I assume the file already exists and can't write to.

    A fix for it, or do I need to go to each and every domain, temporarily deactivate it, go to /etc/apache2/sites-enabled,
    check on all the 100-<domain>.com.vhost, remove the file manually, and go back to the GUI and click Activate the domain and that will trigger the symlink, 100-domain1.com.vhost -> /etc/apache2/sites-available/domain1.com.vhost

    Thank again for the debug and checking on this, and if I'm on the right path or if there is a way to remove all non-sym and trigger a manually check/reconfig and or recreate.
     

Share This Page