Author Topic: Job for httpd.service failed  (Read 1004 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Job for httpd.service failed
« on: December 15, 2023, 09:11:04 PM »
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."


Offline
****
Re: Job for httpd.service failed
« Reply #1 on: December 15, 2023, 09:43:26 PM »
Please run the following commands

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

Offline
*
Re: Job for httpd.service failed
« Reply #2 on: December 15, 2023, 09:56:19 PM »
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.

Offline
****
Re: Job for httpd.service failed
« Reply #3 on: December 15, 2023, 10:02:42 PM »
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

Offline
*
Re: Job for httpd.service failed
« Reply #4 on: December 15, 2023, 10:14:27 PM »
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.


Offline
****
Re: Job for httpd.service failed
« Reply #5 on: December 15, 2023, 10:33:30 PM »
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

Offline
*
Re: Job for httpd.service failed
« Reply #6 on: December 15, 2023, 10:54:17 PM »
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.


Offline
****
Re: Job for httpd.service failed
« Reply #7 on: December 15, 2023, 10:58:53 PM »
post your httpd.conf and your nginx.conf
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: Job for httpd.service failed
« Reply #8 on: December 15, 2023, 11:37:40 PM »
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.


Offline
****
Re: Job for httpd.service failed
« Reply #9 on: December 15, 2023, 11:47:52 PM »
use Pastebin or another temp hosting service to share the contents.

Offline
*
Re: Job for httpd.service failed
« Reply #10 on: December 16, 2023, 12:07:31 PM »
« Last Edit: December 16, 2023, 12:34:39 PM by Verto »

Offline
****
Re: Job for httpd.service failed
« Reply #11 on: December 16, 2023, 12:41:08 PM »
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

Offline
****
Re: Job for httpd.service failed
« Reply #12 on: December 17, 2023, 05:31:28 AM »
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