Apache stopped working and will not start?

beansbaxter

Verified User
Joined
Mar 17, 2004
Messages
163
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.
 

beansbaxter

Verified User
Joined
Mar 17, 2004
Messages
163
Location
WA
This fixed the problem:

Code:
cd /usr/local/directadmin/custombuild
./build update
/usr/local/directadmin/directadmin p
./build rewrite_confs
 

aammiitt

Verified User
Joined
May 29, 2021
Messages
15
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!
 

beansbaxter

Verified User
Joined
Mar 17, 2004
Messages
163
Location
WA
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
 

aammiitt

Verified User
Joined
May 29, 2021
Messages
15
very strange. i rebuild. it showed Started for a while then it again stopped! i really don't understand. Please help urgently.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
7,644
Location
Maastricht
Look at the output of:
systemctl status httpd.service
and
journalctl -xe

post output here, it should contain the error.
 

kristian

Verified User
Joined
Nov 4, 2005
Messages
270
Location
Norway
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.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
7,644
Location
Maastricht
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.
 

sgala

Verified User
Joined
Jul 10, 2017
Messages
22
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?
 

bdacus01

Verified User
Joined
Jul 22, 2017
Messages
3,130
Location
Murfreesboro
Do this

Code:
/usr/local/directadmin/directadmin p
cd /usr/local/directadmin/custombuild
./build rewrite_confs
./build update
./build apache
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
7,644
Location
Maastricht
Seems same bug as here:

more and more people are having this issue.
 

aitorserra

Verified User
Joined
Jul 4, 2019
Messages
21
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.
 

Unifex

Verified User
Joined
Nov 24, 2016
Messages
6
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
 

indositehost

Verified User
Joined
Jun 30, 2019
Messages
8
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 :)
 

theurbanflow507

Verified User
Joined
Apr 7, 2021
Messages
9
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á
 
Top