I am really really frustrated trying to get virtualmin OFF Fast_cgi and ONto php-fpm. I’ve been trying to get this done now for over a week now and nothing seems to be getting me closer. phpinfo() works but can’t get wordpress going. Looked at tons of posts about rewrite rules. From looking at the logs I think fast CGI is still not disabled. I have removed the fast_cgi startup script from /etc/init.d, edited /usr/share/webmin/virtualmin-nginx/virtualmin-nginx-lib.pl and commented the start_php_fcgi_server_command on line 1710, put return; statements in the subs related to starting fast_cgi in that script, yet the logs reflect fast_cgi still runs.
I really hate to start over from scratch again (install w/vmin, nginx module, firewall security plugin, domain setup, DB setup, etc etc. Takes an hour or so, and I was careful last time and am doubtful if it would do any good anyway. I saw a warning in the docs about not switching after domains are created, but no telling how old that doc is. Afaik it might be before the beta php-fpm support even existed.
I didn’t see anything in the original install concerning support for php-fpm, so I installed this guy’s module. I seem to recall stumbling across a different one that showed a radio button in the virtualmin UI for php-fpm or fast_cgi, but that tutorial / info was exclusively for an RPM / yum based (ie. non debian) OS and was pretty useless to me.
From phpinfo():
System Linux xxx.yyy.com 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64
Build Date Feb 8 2017 08:50:44
Server API FPM/FastCGI <--------------------------------------------- Why both?
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5/fpm
Loaded Configuration File /etc/php5/fpm/php.ini
Scan this dir for additional .ini files /etc/php5/fpm/conf.d
… Under cgi-fcgi:
php-fpm active (only a sinlge line, followed by:)
cgi.discard_path 0 0
cgi.fix_pathinfo 0 0 <---------------------------- Does not reflect /etc/php5/fpm/php.ini which is 1
cgi.force_redirect 1 1
cgi.nph 0 0
cgi.redirect_status_env no value no value
cgi.rfc2616_headers 0 0
fastcgi.error_header no value no value
fastcgi.logging 1 1
fpm.config no value no value
Log file (/var/log/nginx/<domain.conf>) shows:2017/04/06 12:24:37 [error] 597#0: *4 FastCGI sent in stderr: “PHP message: PHP Warning: require(/home/one/public_html/wp-includes/load.php): failed to open stream: Permission denied in /home/one/public_html/wp-settings.php on line 19
PHP message: PHP Fatal error: require(): Failed opening required ‘/home/one/public_html/wp-includes/load.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /home/one/public_html/wp-settings.php on line 19” while reading response header from upstream, client: , server: .com, request: “POST / HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5-fpm-mydomain.com.sock:”, host: “”
- OS is Debian 8.6
- W/Vmin version is 1.831 / 5.07 (GPL)
- webmin-virtualmin-nginx 2.2 -ssl 1.4
- PHP Version 5.6.30-0+deb8u1
If I list processes with “ps aux | grep php” I see only the php-fpm processes running, so I presume it’s php-fpm serving up the phpinfo() page, and not fast_cgi, despite the log file output. That leads me to believe the issue is in w/vmin.