after disabling mod_php (php7.3 apache.service restart returns Failed state error)

3 posts / 0 new
Last post
#1 Tue, 05/07/2019 - 19:59
adamjedgar

after disabling mod_php (php7.3 apache.service restart returns Failed state error)

AFter reading about mpm-prefork/worker/event options, I notice that my system has defaulted to mpm-prefork. So i went into webmin>servers>apache webserver>configure apache modules:

Are the following two mod_php? php7.0 php7.3

php7.0 was not checked, however php7.3 was

I unchecked php7.3 and also prefork, then checked worker...however,

after then clicking "Enable Selected Modules" my system returns the following error...

systemctl status apache2.service
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-05-08 10:00:14 AEST; 36s ago
  Process: 21391 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
  Process: 3157 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
  Process: 21416 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 5884 (code=exited, status=0/SUCCESS)

May 08 10:00:14 server1.domain.com systemd[1]: Starting The Apache HTTP Server...
May 08 10:00:14 server1.domain.com apachectl[21416]: AH00526: Syntax error on line 45 of /etc/apache2/sites-enabled/0-domain.com.conf:
May 08 10:00:14 server1.domain.com apachectl[21416]: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
May 08 10:00:14 server1.domain.com apachectl[21416]: Action 'start' failed.
May 08 10:00:14 server1.domain.com apachectl[21416]: The Apache error log may have more information.
May 08 10:00:14 server1.domain.com systemd[1]: apache2.service: Control process exited, code=exited status=1
May 08 10:00:14 server1.domain.com systemd[1]: Failed to start The Apache HTTP Server.
May 08 10:00:14 server1.domain.com systemd[1]: apache2.service: Unit entered failed state.
May 08 10:00:14 server1.domain.com systemd[1]: apache2.service: Failed with result 'exit-code'.

my apache error log has the following entry for this time...

[Wed May 08 10:00:14.097087 2019] [mpm_prefork:notice] [pid 5884] AH00169: caught SIGTERM, shutting down

I cant restart webserver.

Obviously, once i return settings to what they were before hand, apache restarts no problem.

After i restored the original module settings and then started apache (about 15 minutes later), I then notice the following in webmin>system>system logs>apache2/error.log

[Wed May 08 10:15:38.637091 2019] [suexec:notice] [pid 24646] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed May 08 10:15:38.704815 2019] [mpm_prefork:notice] [pid 24647] AH00163: Apache/2.4.25 (Debian) mod_fcgid/2.3.9 OpenSSL/1.0.2r configured -- resuming normal operations


Line 45 of /etc/apache2/sites-available/0-domain.com.conf reads php_admin_value engine Off

So, what is wrong with "php_admin_value engine off" in relation to disabling mod_php?

why cant i disable this? None of my domains, as far as i can tell are using mod_php. I have not selected it for any virtual servers in virtualmin>server configuration>website options (all are running fcgi)

Tue, 05/07/2019 - 21:31
adamjedgar

Also, if i follow this outline...http://crazed.io/2013/05/virtualmin-and-enabling-apache-mpm-worker/

I no longer get the errors above, however, wordpress websites on the virtual hosts running wordpress stop working with the same error (static html sites keep running)

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

apache log when i try to then access a wordpress website returns

[Wed May 08 12:29:45.384512 2019] [suexec:notice] [pid 14881:tid 140390789054528] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed May 08 12:29:45.432060 2019] [mpm_worker:notice] [pid 14882:tid 140390789054528] AH00292: Apache/2.4.25 (Debian) mod_fcgid/2.3.9 OpenSSL/1.0.2r configured -- resuming normal operations
[Wed May 08 12:29:45.432134 2019] [core:notice] [pid 14882:tid 140390789054528] AH00094: Command line: '/usr/sbin/apache2'

and here is the log for the virtual server running wordpress

[Wed May 08 12:31:44.162735 2019] [proxy:error] [pid 14884:tid 140390640715520] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Wed May 08 12:31:44.162781 2019] [proxy_fcgi:error] [pid 14884:tid 140390640715520] [client <ipaddress>:59693] AH01079: failed to make connection to backend: httpd-UDS, referer: https://domain.com.au/

What is now causing the 503 error?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Thu, 05/09/2019 - 17:42
adamjedgar

is there no one who has an answer on this?

There must be some kind of standard on this that works...I am running Debian 9

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Topic locked