PHP 7.4 and Apache2 start problem

arky_

Verified User
Joined
Apr 25, 2020
Messages
25
Hello,
I installed php 7.4 for directamin as an additional. After installation, the httpd (apache2) service turned off and no websites work. I deleted php 7.4 and I have php 7.3 by default but I still can't enable httpd service.
/ usr / bin / systemctl start httpd.service> / dev / null 2> & 1 -v has no effect.
Help how to run it?
 

arky_

Verified User
Joined
Apr 25, 2020
Messages
25
/ usr / bin / systemctl start httpd.service pokazuje:
W pobliżu
Zadanie dla httpd.service nie powiodło się, ponieważ proces kontroli zakończył się z kodem błędu.
Zobacz „systemctl status httpd.service” i „journalctl -xe”, aby uzyskać szczegółowe informacje.

gdzie:

„Systemctl status httpd.service” daje nam:

Zadanie dla httpd.service nie powiodło się, ponieważ proces kontroli zakończył się z kodem błędu.
Zobacz „systemctl status httpd.service” i „journalctl -xe”, aby uzyskać szczegółowe informacje.
root @ server1: / usr / local # systemctl status httpd.service
● httpd.service - Serwer HTTP Apache
Załadowano: załadowano (/etc/systemd/system/httpd.service; dostępny; preset dostawca: włącz)
Aktywny: nieudany (Wynik: kod wyjścia) od śro 2020-06-03 18:14:06 CEST; 4s temu
Proces: 28878 ExecStart = / usr / sbin / httpd $ OPCJE -DFOREGROUND (kod = zakończony, status = 1 / AWARIA)
Główny PID: 28878 (kod = zakończony, status = 1 / AWARIA)

03 czerwca 18:14:06 server1.web-hosting24.pl systemd [1]: Uruchamianie serwera HTTP Apache ...
03 czerwca 18:14:06 server1.web-hosting24.pl httpd [28878]: httpd: Błąd składniowy w wierszu 50 /etc/httpd/conf/httpd.conf: Błąd składniowy w wierszu 3 / etc / httpd / conf / extra /httpd-phpmodules.conf: Błąd składniowy w wierszu 35 pliku / etc / httpd / conf / extra /
03 czerwca 18:14:06 server1.web-hosting24.pl systemd [1]: httpd.service: Proces główny zakończony, kod = zakończony, status = 1 / AWARIA
03 czerwca 18:14:06 server1.web-hosting24.pl systemd [1]: httpd.service: Błąd wyniku „kod-wyjścia”.
03 czerwca 18:14:06 server1.web-hosting24.pl systemd [1]: Uruchomienie serwera HTTP Apache nie powiodło się.
l
 

jamgames2

Verified User
Joined
Aug 16, 2019
Messages
75
/ etc / httpd / conf / extra /httpd-phpmodules.conf
Something has borken in this file on line 35

try rebuild your Webserver
 

arky_

Verified User
Joined
Apr 25, 2020
Messages
25
I used:

cd / usr / local / directadmin / custombuild
./build update
./build apache
./build php n
./build rewrite_confs

but I still have the same mistake.

Line: Jun 04 11:28:07 server1.web-hosting24.pl httpd [11067]: httpd: Syntax error on line 50 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of / etc / httpd /conf/extra/httpd-phpmodules.conf: Syntax error on line 35 of / etc / httpd / conf / extra /
It doesn't show the whole length and I don't know how to display it in two lines.
 

jamgames2

Verified User
Joined
Aug 16, 2019
Messages
75
I used:

cd / usr / local / directadmin / custombuild
./build update
./build apache
./build php n
./build rewrite_confs

but I still have the same mistake.

Line: Jun 04 11:28:07 server1.web-hosting24.pl httpd [11067]: httpd: Syntax error on line 50 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of / etc / httpd /conf/extra/httpd-phpmodules.conf: Syntax error on line 35 of / etc / httpd / conf / extra /
It doesn't show the whole length and I don't know how to display it in two lines.
try change name file : httpd-phpmodules.conf
to : httpd-phpmodules.conf_backup
then rebuild again.

last solution
try change name folder /etc/httpd to /etc/httpd_bk
then rebuild again.
 

arky_

Verified User
Joined
Apr 25, 2020
Messages
25
Ok, I was able to run "httpd" (by commenting the line) but the problem still remains!
Clings to 35 lines of the file "httpd-modsecurity.conf"
-
IncludeOptional /etc/modsecurity.d/*.conf.main
-
and this line leads to: "copmodo-rules.conf.main", in which there is one line:
-
Include /etc/cwaf/cwaf.conf
-
and here is the problem because in / etc I don't have the "cwaf" folder
I will not smile to leave it in this state.
 

jamgames2

Verified User
Joined
Aug 16, 2019
Messages
75
Ok
Are you using any modsecurity ?

this same problem too
Can you check this on #15
 

arky_

Verified User
Joined
Apr 25, 2020
Messages
25
Yes, I had it started from the very beginning. Everything worked fine until the second version of php 7.4 was installed. Now, regardless of whether I have it turned on or not, apache2 doesn't get up.
As I comment in "copmodo-rules.conf.main", the following line:
Include /etc/cwaf/cwaf.conf
This Apache2 works.
I can't kill the httpd process "-bash: kill: 25982: signal incorrectly specified" and a different PID each time. It seems to me that this is the process of the administrative back end.
 
Top