Having trouble with apache and suphp

NeTGuarD

Verified User
Joined
Feb 11, 2018
Messages
5
Hello every body!
I have nginx_apache web server (last version) on my Direct Admin server with CentOS.
I have installed two php:
First: 7.2 with suphp
Second: 5.6 with fastcgi

today I wanted to open a page on my server that I faced with 502 Bad Gateway error and checked the nginx error log and it was empty! so I went to open apache's error log and found this log:


[Sun Feb 11 19:14:01.346482 2018] [mpm_event:notice] [pid 24154:tid 140188786718656] AH00491: caught SIGTERM, shutting down

then I informed with DA message system that "apache is currently down". So I tried to restart/start it but this action failed because of this error:

Starting httpd: AH00526: Syntax error on line 49 of /usr/local/directadmin/data/users/admin/httpd.conf:
Invalid command 'suPHP_Engine', perhaps misspelled or defined by a module not included in the server configuration

Anybody could help me?
Thanks
 
I don't think SuPHP is stable when running mpm event. If you want to run SuPHP, you should run mpm prefork. However if you do not modify the httpd config files manually, DirectAdmin should take care of this for you. My guess is you need to run:

Code:
./build update
./build rewrite_confs
 
Edit: By the way, SuPHP is outdated and not developed for many years, you should not use it. Instead PHP-FPM is a good option.
 
ditto is right, but when you use Apache and Nginx as reverse proxy it is required to run both in PHP-FPM.

Code:
cd /usr/local/directadmin/custombuild

./build set php1_mode php-fpm
./build set php2_mode php-fpm
./build set php1_release 7.2
./build set php2_release 5.6

then at the end

Code:
./build php n
./build rewrite_confs
 
Edit: By the way, SuPHP is outdated and not developed for many years, you should not use it. Instead PHP-FPM is a good option.

So, wich handler you suggest me?
I need a fast and secure handler. Is fastcgi better than php-fpm? because php-fpm only supports nginx (as I know)
 
ditto is right, but when you use Apache and Nginx as reverse proxy it is required to run both in PHP-FPM.

excuse me, Are you sure that php-fpm supports both of nginx and apache together?
 
So, wich handler you suggest me?
I need a fast and secure handler. Is fastcgi better than php-fpm? because php-fpm only supports nginx (as I know)

In my opinion PHP-FPM is better and more modern than all the other options. PHP-FPM supports Apache also.
 
PHP-FPM does not care of Apache, NGINX, etc. But both Apache and NGINX can connect to PHP-FPM when it's needed for processing PHP scripts. It is Apache and NGINX which supports PHP-FPM.

excuse me, Are you sure that php-fpm supports both of nginx and apache together?
 
Back
Top