Sunday 15 September 2013

apache2 - PHP-FPM is not working as expected -


I am using Debian Squeeze and am setting up PHP-FPM with phpcgi. I have many virtual hosts defined on the same host. I have defined chroot for each pool configuration but by any means it is possible to change this directory and go above the root directory definition in the pool config.

The conf_functions also does not work on the conf file. I have not understood the reason.

Sample files are below:

/etc/php5/fpm/pool.d/foo.conf:

  [foo] user = foo group = foo listen = 127.0.0.1:9018 listen.allowed_clients = 127.0.0.1 pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 chroot = / var / www / foo chdir = / Php_admin_valu [Disabl_fnkshns] = dir, Cdir, Opendir, Reddir Php_admin_valu [Do_rut] = / var / www / Fu Php_admin_valu [Opan_bsedir] = / var / www / Fu Aksesklog = / var / people / $ Pul.aksesklog Access.format = "% R -% u% t \"% m% r% Q \ "% s% f% {mill} d% {kil} m% c %%"   

/etc/apache2/sites-enables/foo.com:

  & lt; VirtualHost 19x.xxx.xxx.xx & gt; DocumentRoot / var / www / foo Server name foo.com & lt; IfModule mod_fastcgi.c & gt; FastCgiExternalServer / foocgi / PHP5- casing host 127.0.0.1:9018 -user foouser -group foogroup ScriptAlias ​​/ foocgi / / var / www / foo / cgi-bin / AddHandler PHP5-FastCGI .php action PHP5-FastCGI / foocgi / php5 - Cover ADType Application / X-HPD-PP .php & lt; Directory / var / www / foo / cgi-bin / & gt; SetHandler fastcgi-script option + ExecCGI & lt; / Directory & gt; & Lt; / IfModule & gt; & Lt; Directory / var / www / foo & gt; Allow all options - Index SymLinksIfOwnerMatch & lt; / Directory & gt; & Lt; / VirtualHost & gt;   

/ var / www / foo / cgi-bin / PHP5- cover:

  # / bin / sh PHPRC = / etc / PHP5 / cgi / export PHPRC #export PHP_FCGI_MAX_REQUESTS = 5000 #export PHP_FCGI_CHILDREN = 8 executive / usr / lib / cgi-bin / php   

/etc/apache2/mods-enabled/fastcgi.conf:

  & lt; IfModule mod_fastcgi.c & gt; FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300 -idle- timeout 240 -maxClassProcesses 1 -pass header HTTP_AUTHORIZATION FastCgiWrapper / usr / lib / apache2 / suexec & LT; Directory "/ var / www / cgi-bin /" & gt; Allow override no option + ExecCGI -MultiViews + SymLinksIfOwnerMatch order Allow, Allow all from & lt; / Directory & gt; & Lt; / IfModule & gt;   

The /var/log/foo.access.log is empty, although the port 9018 is listed on netstat output. The site is being opened without any errors. Is chroot problem or how to work disable_functions?

itemprop = "text">

After you can show your php information (any thoughts about)

You can load php.ini from /etc/php5/cgi/php.ini and from your pool / d / / or / etc / PHP5 / FPM / php with your php-FPM config. I

I say to:

/ bin / sh

PHPRC = / etc / PHP5 / cgi / export PHPRC

Export PHP_FCGI_MAX_REQUESTS = 5000

Export PHP_FCGI_CHILDREN = 8

Operating / usr / lib / cgi-bin / php

PHP5-FPM is usually in / Usr / sbin / php5-fpm

But maybe I failed because my english is very bad: /

No comments:

Post a Comment