New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Job for httpd.service failed

Started by Verto, December 15, 2023, 09:11:04 PM

Previous topic - Next topic

Verto

Hello, Please, I need urgent help to recover a downed server, which I am unable to recover on my own, nor do I think I have the knowledge to do so.

The error seems to report a conflict on port 80, which is occupied by Apache or by NGINX, but both have stopped working together.

My server was configured as Nginx & Varnish & Apache. But Apache won't start now and I have several websites down.

I have tried to restart everything, both the services and the server, but the problem is not solved and if I try to start Apache, I get this error:

"Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details."


rcschaff

Please run the following commands

netstat -lp | grep 80
journalctl -xe -u nginx
journalctl -xe -u apache2
Google Hangouts:  rcschaff82@gmail.com

Verto

My impatience to solve the problem and recover the downed sites, I think, has aggravated the situation.

Not knowing what to do, I decided to rebuild the server configuration from WebServer Settings/Select WebServers/ Nginx & Varnish & Apache, but the error kept occurring and in the end I discovered that Nginx and Apache were trying to use the same port. So I configured the ports correctly, and now I have managed to get the server to start. But I still have a problem, because it doesn't seem to point to any of the domains, as it doesn't show the contents of the directories where the sites are hosted. It always shows a 404 error, except in one of the domains where it shows an Apache test page.

rcschaff

If you allowed CWP to rebuild the servers, it should have change apache to port 8080 automatically.  If however you installed a different version of apache, it may not work correctly.
Google Hangouts:  rcschaff82@gmail.com

Verto

Well, the truth is that I could not say. I just pressed the rebuild button, without modifying anything else. I understand that the rebuild had to be done with the configuration that I had previously, but the truth is that then I had to manually modify the ports, because I had assigned port 80 to Nginx and Apache.

How could I solve the problem?

I have several sites, which cannot be accessed right now.


rcschaff

I would rebuild the configuration Apache only to see if it get's working, and disable NGINX temporarily.  Then if that works, rebuild with your current config
Google Hangouts:  rcschaff82@gmail.com

Verto

I've rebuilt it, and I've tried configuring just nginx as well, but it still doesn't direct to the directories where the websites are hosted. I don't know what else to do.


rcschaff

post your httpd.conf and your nginx.conf
Google Hangouts:  rcschaff82@gmail.com

Verto

I can't. The forum won't let me upload attachments, nor will it let me post the code for the files. It is returning an error stating that I am not authorized, when I try to post it.


overseer

use Pastebin or another temp hosting service to share the contents.

Verto

#10

rcschaff

Your https.conf tells me that your Apache is not the cwp installed version.  The Apache version for cwp should be installed under /usr/local/apache
Google Hangouts:  rcschaff82@gmail.com

rcschaff

Let's start by remove apache.

run from shell:

yum remove httpd apache2



Then try to reconfigure the servers from CWP Admin
Google Hangouts:  rcschaff82@gmail.com

vsbradsmith

im having a simlar problem and i have not made any changes and it just failed and i needed to roll back. i did find that there was an SSL problem also. im wondering would data and time have anything to do with it?

Starburst

And this is why you should make a snapshot BEFORE making any major changes to a server.
Software and/or Hardware.