Apache stopped working and will not start?

beansbaxter

Verified User
Joined
Mar 17, 2004
Messages
218
Location
WA
I have a DA server that's been running fine, along with the regular updates along the way... and then suddenly, Apache is stopped and won't start.

How to solve this?
Code:
AH00526: Syntax error on line 31 of /usr/local/directadmin/data/users/dcdev/httpd.conf:
Invalid command '|UNIT_PROXY|', perhaps misspelled or defined by a module not included in the server configuration
httpd.service: main process exited, code=exited, status=1/FAILURE
Failed to start The Apache HTTP Server.
Unit httpd.service entered failed state.
httpd.service failed.

And tried to rebuild Apache, and get this at the end of the rebuild:
Code:
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

Running DA 1.62.2 and Apache 2.4.48 if it matters.

Any help or advice would be appreciated. Thanks.
 
This fixed the problem:

Code:
cd /usr/local/directadmin/custombuild
./build update
/usr/local/directadmin/directadmin p
./build rewrite_confs
 
This fixed the problem:

Code:
cd /usr/local/directadmin/custombuild
./build update
/usr/local/directadmin/directadmin p
./build rewrite_confs
Hi Beanbaxter.
If i rebuild Apache. Will it destroy my website already sunning on the server?
Kindly help urgently!
 
Hi Beanbaxter.
If i rebuild Apache. Will it destroy my website already sunning on the server?
Kindly help urgently!
You can safely rebuild Apache on a live server, and it won't affect your website data.

You can rebuild it from within the DA control panel, or alternatively you can do via SSH at the command line:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build apache
./build rewrite_confs
 
very strange. i rebuild. it showed Started for a while then it again stopped! i really don't understand. Please help urgently.
 
Look at the output of:
systemctl status httpd.service
and
journalctl -xe

post output here, it should contain the error.
 
Look at the output of:
systemctl status httpd.service
and
journalctl -xe

post output here, it should contain the error.
OUTPUT:

systemctl status httpd.service
1624773598318.png


journalctl -xe
1624773755723.png
 
The output from systemctl status httpd.service says you have a syntax error in the apache config. The whole message is cut off in your screenshot, but that's where you need to take a look, in the file specified, on the line specified.
 
Yep, 2nd line of /etc/httpd/conf/extra/directories.conf or directories-new.conf.
And also on line 225 of /etc/httpd/conf/httpd.conf

Check your custom directory if there are conf files in there. I hope you didn't mess with the directories-x.conf files and symlinks either.
 
Got exactly same problem.
Error in "usr/local/directadmin/data/users/admin" line 26
I checked httpd.conf at line 26 and it has
"
|UNIT_PROXY|
"
Nothing more, nothing less.
How to fix it?
 
Do this

Code:
/usr/local/directadmin/directadmin p
cd /usr/local/directadmin/custombuild
./build rewrite_confs
./build update
./build apache
 
Seems same bug as here:

more and more people are having this issue.
 
This morning I woke up with the same problem and the solution was to build Apache using custombuild. I have written to support to see if they can tell me why this has happened, and how to avoid having such a bad breakfast again. Thanks for posting the solution.
 
same bug on 5 servers, after updating php 7.4.x with custombuild, apache would not restart because of syntax error (Invalid command '|UNIT_PROXY|')
>> solution
cd /usr/local/directadmin/custombuild
./build update
/usr/local/directadmin/directadmin p
./build rewrite_confs
 
Same bug too with the error of
Code:
Invalid command '|UNIT_PROXY|'

Solved by post #2
Code:
cd /usr/local/directadmin/custombuild
./build update
/usr/local/directadmin/directadmin p
./build rewrite_confs


Thank you :)
 
El mismo error también con el error de
[CÓDIGO] Comando no válido '| UNIT_PROXY |' [/ CÓDIGO]

Resuelto por la publicación # 2
[CÓDIGO] cd / usr / local / directadmin / custombuild
./build update
/ usr / local / directadmin / directadmin p
./build rewrite_confs [/ CODE]


Gracias :)
gracias amigo me funciono ..... saludos desde panamá
 
Back
Top