If Apache is running, Nginx won’t run and if Nginx is running Apache won’t start.
There haven’t been any changes made to the server so I’m not sure why the sudden errors. It’s been running fine these last few months until now this binding issue.
This is Nginx trying to start when Apache is running.
2022/05/21 16:12:05 [emerg] 9219#9219: bind() to 10.0.0.35:8080 failed (98: Address already in use)
2022/05/21 16:12:05 [emerg] 9219#9219: bind() to 10.0.0.35:8443 failed (98: Address already in use)
2022/05/21 16:12:05 [emerg] 9219#9219: bind() to 10.0.0.35:8080 failed (98: Address already in use)
2022/05/21 16:12:05 [emerg] 9219#9219: bind() to 10.0.0.35:8443 failed (98: Address already in use)
2022/05/21 16:12:05 [emerg] 9219#9219: bind() to 10.0.0.35:8080 failed (98: Address already in use)
2022/05/21 16:12:05 [emerg] 9219#9219: bind() to 10.0.0.35:8443 failed (98: Address already in use)
2022/05/21 16:12:05 [emerg] 9219#9219: bind() to 10.0.0.35:8080 failed (98: Address already in use)
2022/05/21 16:12:05 [emerg] 9219#9219: bind() to 10.0.0.35:8443 failed (98: Address already in use)
2022/05/21 16:12:05 [emerg] 9219#9219: bind() to 10.0.0.35:8080 failed (98: Address already in use)
2022/05/21 16:12:05 [emerg] 9219#9219: bind() to 10.0.0.35:8443 failed (98: Address already in use)
2022/05/21 16:12:05 [emerg] 9219#9219: still could not bind()
This is Apache trying to run when Nginx is running
May 21 16:23:03 serverhostname.here systemd[1]: Starting The Apache HTTP Server...
May 21 16:23:03 serverhostname.here apachectl[18938]: (98)Address already in use: AH00072: make_sock: could not bind to address 10.0.0.35:8443
May 21 16:23:03 serverhostname.here apachectl[18938]: no listening sockets available, shutting down
May 21 16:23:03 serverhostname.here apachectl[18938]: AH00015: Unable to open logs
May 21 16:23:03 serverhostname.here apachectl[18935]: Action 'start' failed.
May 21 16:23:03 serverhostname.here apachectl[18935]: The Apache error log may have more information.
May 21 16:23:03 serverhostname.here systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
May 21 16:23:03 serverhostname.here systemd[1]: apache2.service: Failed with result 'exit-code'.
May 21 16:23:03 serverhostname.here systemd[1]: Failed to start The Apache HTTP Server.t' failed.
How do I find out what caused it/which config file is corrupted? I haven’t touched this server in a while, so there haven’t been any changes besides whatever is automated by the control panel/updates on the server.
#!/bin/bash
source /etc/hestiacp/hestia.conf
source $HESTIA/func/main.sh
for user in $($BIN/v-list-users plain | cut -f1 ); do
$BIN/v-rebuild-web-domains $user
done
Ran this and rebooted, still no difference. Only one is able to come on. I tried rebuilding each one with v-rebuild-web-domains aswell and that didn’t work either.
Changed WEB_PORT to 8081 and WEB_SSL_PORT to 8441 in /usr/local/hestia/conf/hestia.conf (picked it up from this thread) to two different ports one/two characters up/down, ran your script to rebuild all the users and it’s now binding and allowing it to start.
Is there a base Nginx template that I should be looking at to compare with other config files? I’d like to go through my configuration files and see what’s causing this.
I’m gonna make a backup of this server and move it over to a fresh install on a different server so the websites can stay live, then you could perhaps take a look after if I don’t find anything myself?
It seems my templates are corrupted somehow? Because after doing this, going to a website that isn’t suspended in my users shows the suspended screen. And if I unsuspend the suspended user, the websites go to normal but they go to each other instead of their own domain. So if I went to x1.com it will redirect me to x2.com which is completely seperate?