Apache 2.4 + PHP 5.6 + PHP-FPM on FreeBSD 10.2

Apache with PHP-FPM, chroots and per-vhost UIDs
Setting up Apache with PHP-FPM

A better way to run PHP-FPM
PHP-FPM Configuration 101 (php-fpm.conf, www.conf)

PHP-FPM not working as PHP handler in Apache
High-performance PHP on apache httpd 2.4.x using mod_proxy_fcgi and php-fpm
Apache 2.4 + PHP-FPM problem
Apache, PHP-FPM, MariaDB and FreeBSD
PHP method #3: PHP-FPM

What is the difference between fastcgi and fpm?
Differences and dis/advanages between: Fast-CGI, CGI, Mod-PHP, SuPHP, PHP-FPM
Showdown: HHVM vs. PHP5-fcgi vs. PHP5-FPM

First try

<VirtualHost www.example.com>
    ServerName      example.com
    ServerAlias     www.example.com
    ServerAdmin     info@example.com
    DocumentRoot    /web/example.com/www

    ErrorLog        /web/example.com/.logs/www-error.log
    CustomLog       /web/example.com/.logs/www-access.log common
    CustomLog       /web/example.com/.logs/www-referer.log referer
    CustomLog       /web/example.com/.logs/www-agent.log agent

    ProxyPassMatch  ^/(.*\.php(/.*)?)$ unix:/tmp/fpm_www_example_com.sock|fcgi://localhost/web/example.com/www
    DirectoryIndex  /index.php index.php

user = www_example_com
group = www_example_com

listen = /tmp/fpm_www_example_com.sock

pm = ondemand
pm.max_children = 5
pm.process_idle_timeout = 120s;
pm.max_requests = 500
[Sat Dec 19 22:13:00.127794 2015] [proxy:error] [pid 82692] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /tmp/fpm_www_example_com.sock (localhost) failed
[Sat Dec 19 22:13:00.128004 2015] [proxy:error] [pid 82692] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
[Sat Dec 19 22:13:00.128038 2015] [proxy_fcgi:error] [pid 82692] [client] AH01079: failed to make connection to backend: httpd-UDS


[Sun Dec 20 11:39:18.535056 2015] [core:error] [pid 82705] (13)Permission denied: [client] AH00035: access to /index.html denied (filesystem path '/web/example.com/www/index.html') because search permissions are missing on a component of the path


Leave a Reply

Your email address will not be published. Required fields are marked *