hestiacp / hestiacp

Hestia Control Panel | A lightweight and powerful control panel for the modern web.
https://hestiacp.com
GNU General Public License v3.0
3.4k stars 680 forks source link

[Bug] Webserver configuration binds to all IPs at setup, leading to restart failures #4118

Open xeruf opened 1 year ago

xeruf commented 1 year ago

Describe the bug

I was setting up HestiaCP on a new VM with three IP addresses: cluster-local DHCP, lan static, wan static

Now when trying to import users, I kept getting reports about restarts of apache2 and nginx failing (which, btw, should not lead to an incomplete import as it happened now...) until I removed the entries for the cluster-local DHCP IP (which does not matter anyways) from /etc/(nginx|apache2)/conf.d/IP.conf, at which point the import proceeded fine.

Tell us how to replicate the bug

  1. Setup a HestiaCP instance with a DHCP IP
  2. Restart the machine so it gets a different IP
  3. Restart apache2 or nginx

Solution ideas:

Which components are affected by this bug?

Control Panel Command Line Interface, (Backend) Web Server (Nginx, Apache2)

Hestia Control Panel Version

v1.8.10

Operating system

Debian 12

Log capture

No response

jaapmarcus commented 1 year ago

Hestia can work fine with dynamic ip if there is only one present. It will run v-update-sys-ip on boot. And If there is NAT envoirment it is probally even required.

We had in the past where it detected only wan ips but it also caused issues with certain setups including proxmox... So reverting it is out of the question...

Only opiton that would work we allow the users to select in the install script the ips that need to be binded to...

If you don't plan to use the dynamic ip delete them after setup of Hestia..