Author Topic: Subdomain removing bug  (Read 236 times)

andy

  • Newbie
  • *
  • Posts: 1
    • View Profile
Subdomain removing bug
« on: June 17, 2024, 03:30:06 am »
Hello,

When you have only one subdomain left and remove it on the EHCP Force web panel, the following things aren't correctly processed:
- The folder /var/www/vhosts/.../domain.com/httpdocs/subdomains doesn't get removed. Also the subdomain folder within this path is still there.
- If you remove it manually, the webserver (in my case apache2) does not start anymore. This is because:
  -> The content for the last remaining subdomain, which was deleted, doesn't get removed from the ehcp apache2 config file in           /var/www/new/ehcp/apachehcp_subdomains.conf. This is not a problem, if you have several subdomains and you remove one, then the block gets removed correctly from this file.

earnolmartin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 307
    • View Profile
Re: Subdomain removing bug
« Reply #1 on: June 20, 2024, 05:20:24 pm »
Hello,

When you have only one subdomain left and remove it on the EHCP Force web panel, the following things aren't correctly processed:
- If you remove it manually, the webserver (in my case apache2) does not start anymore. This is because:
  -> The content for the last remaining subdomain, which was deleted, doesn't get removed from the ehcp apache2 config file in           /var/www/new/ehcp/apachehcp_subdomains.conf. This is not a problem, if you have several subdomains and you remove one, then the block gets removed correctly from this file.

Thanks, this should be fixed in GitHub.  Please update your classapp.php file using the following method:

https://ehcpforce.tk/download.php#ehcpforceclassappupdate-test

Is it fixed now?  It appears to be from my testing...

I also added the same checks for if there are no domains or passive domains.

- The folder /var/www/vhosts/.../domain.com/httpdocs/subdomains doesn't get removed. Also the subdomain folder within this path is still there.

The presence of that empty folder doesn't hurt anything, so I'll just leave it there for now.