Author Topic: php upstream server / fastcgi_pass php-handler  (Read 7990 times)

0 Members and 1 Guest are viewing this topic.

php upstream server / fastcgi_pass php-handler
« on: January 29, 2018, 11:40:12 AM »
Apache & Varnish Cache & Nginx Reverse Proxy
CentOS Linux release 7.4.1708 (Core) x86_64
Kernel Version: 3.10.0-693.17.1.el7.x86_64
Apache/2.4.2
nginx/1.12.2
PHP version: 5.6.30
suPHP version 0.7.2
Zend Engine v2.6.0 with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)
MySQL version: 10.1.30-MariaDB
CWPpro version: 0.9.8.436
SEL permitting
Mod Security disabled

Set in the nginx vhost
Code: [Select]
upstream php {
    server 127.0.0.1:9000;
}

However nginx -t is complaining
Quote
no port in upstream "php-handler" / fastcgi_pass php-handler


/usr/local/etc/suphp.conf

Code: [Select]
[handlers]
application/x-httpd-php="php:/usr/local/bin/php-cgi"
application/x-httpd-php44="php:/opt/alt/php44/usr/bin/php-cgi"
application/x-httpd-php52="php:/opt/alt/php52/usr/bin/php-cgi"
application/x-httpd-php53="php:/opt/alt/php53/usr/bin/php-cgi"
application/x-httpd-php54="php:/opt/alt/php54/usr/bin/php-cgi"
application/x-httpd-php55="php:/opt/alt/php55/usr/bin/php-cgi"
application/x-httpd-php56="php:/opt/alt/php56/usr/bin/php-cgi"
application/x-httpd-php70="php:/opt/alt/php70/usr/bin/php-cgi"
application/x-httpd-php71="php:/opt/alt/php71/usr/bin/php-cgi"
x-suphp-cgi="execute:!self

CWP apparently did not install php-fpm and there is no process listening on port 9000. Is suphp supposed to handle upstream php and if so how?


 

« Last Edit: January 29, 2018, 12:03:31 PM by n8v8r »

Re: php upstream server / fastcgi_pass php-handler
« Reply #1 on: January 29, 2018, 01:20:50 PM »
apachectl -M shows that suphp_module modules/mod_suphp.so is not loaded.

trying to load it from /etc/httpd/conf.modules.d/suphp.conf (LoadModule suphp_module modules/mod_suphp.so) produces

Quote
Cannot load modules/mod_suphp.so into server: /etc/httpd/modules/mod_suphp.so: cannot open shared object file: No such file or directory



Re: php upstream server / fastcgi_pass php-handler
« Reply #2 on: January 29, 2018, 04:58:14 PM »
nginx and shphp apparently are not good match thus php-fpm it is then. would be nice if php-fpm being installed automatically along a nginx installation...