{"id":4444,"date":"2015-12-11T20:43:32","date_gmt":"2015-12-11T20:43:32","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=4444"},"modified":"2015-12-20T10:53:57","modified_gmt":"2015-12-20T10:53:57","slug":"apache-2-4-php-5-6-php-fpm-on-freebsd-10-2","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=4444","title":{"rendered":"Apache 2.4 + PHP 5.6 + PHP-FPM on FreeBSD 10.2"},"content":{"rendered":"<p><a href=\"http:\/\/harold.internal.org\/apache-with-php-fpm-chroots-and-per-vhost-uids\/\">Apache with PHP-FPM, chroots and per-vhost UIDs<\/a><br \/>\n<a href=\"http:\/\/www.janoszen.com\/2013\/04\/29\/setting-up-apache-with-php-fpm\/\">Setting up Apache with PHP-FPM<\/a><\/p>\n<p><a href=\"https:\/\/ma.ttias.be\/a-better-way-to-run-php-fpm\/\">A better way to run PHP-FPM<\/a><br \/>\n<a href=\"http:\/\/myjeeva.com\/php-fpm-configuration-101.html\">PHP-FPM Configuration 101 (php-fpm.conf, www.conf)<\/a><\/p>\n<p><a href=\"https:\/\/www.howtoforge.com\/community\/threads\/php-fpm-not-working-as-php-handler-in-apache.62961\/\">PHP-FPM not working as PHP handler in Apache<\/a><br \/>\n<a href=\"https:\/\/wiki.apache.org\/httpd\/PHP-FPM\">High-performance PHP on apache httpd 2.4.x using mod_proxy_fcgi and php-fpm<\/a><br \/>\n<a href=\"https:\/\/forums.freebsd.org\/threads\/solved-apache-2-4-php-fpm-problem.46811\/\">Apache 2.4 + PHP-FPM problem<\/a><br \/>\n<a href=\"https:\/\/www.garron.me\/en\/linux\/apache-event-php-fpm-mariadb-freebsd.html\">Apache, PHP-FPM, MariaDB and FreeBSD<\/a><br \/>\n<a href=\"http:\/\/daemon-notes.com\/articles\/web\/apache\/php-fpm\">PHP method #3: PHP-FPM<\/a><\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/4526242\/what-is-the-difference-between-fastcgi-and-fpm\">What is the difference between fastcgi and fpm?<\/a><br \/>\n<a href=\"http:\/\/serverfault.com\/questions\/645755\/differences-and-dis-advanages-between-fast-cgi-cgi-mod-php-suphp-php-fpm\">Differences and dis\/advanages between: Fast-CGI, CGI, Mod-PHP, SuPHP, PHP-FPM<\/a><br \/>\n<a href=\"https:\/\/blog.snowflake.ch\/2014\/04\/14\/showdown-hhvm-vs-php5-fcgi-vs-php5-fpm\/\">Showdown: HHVM vs. PHP5-fcgi vs. PHP5-FPM<\/a><\/p>\n<h3>First try<\/h3>\n<pre class=\"brush: plain; title: \/web\/example.com\/.config\/apache.d\/www; notranslate\" title=\"\/web\/example.com\/.config\/apache.d\/www\">\r\n&lt;VirtualHost www.example.com&gt;\r\n    ServerName      example.com\r\n    ServerAlias     www.example.com\r\n    ServerAdmin     info@example.com\r\n    DocumentRoot    \/web\/example.com\/www\r\n\r\n    ErrorLog        \/web\/example.com\/.logs\/www-error.log\r\n    CustomLog       \/web\/example.com\/.logs\/www-access.log common\r\n    CustomLog       \/web\/example.com\/.logs\/www-referer.log referer\r\n    CustomLog       \/web\/example.com\/.logs\/www-agent.log agent\r\n\r\n    ProxyPassMatch  ^\/(.*\\.php(\/.*)?)$ unix:\/tmp\/fpm_www_example_com.sock|fcgi:\/\/localhost\/web\/example.com\/www\r\n    DirectoryIndex  \/index.php index.php\r\n&lt;\/VirtualHost&gt;\r\n<\/pre>\n<pre class=\"brush: plain; title: \/web\/example.com\/.config\/fpm.d\/www; notranslate\" title=\"\/web\/example.com\/.config\/fpm.d\/www\">\r\n&#x5B;www_example_com]\r\n\r\nuser = www_example_com\r\ngroup = www_example_com\r\n\r\nlisten = \/tmp\/fpm_www_example_com.sock\r\n\r\npm = ondemand\r\npm.max_children = 5\r\npm.process_idle_timeout = 120s;\r\npm.max_requests = 500\r\n<\/pre>\n<pre class=\"brush: plain; title: \/web\/example.com\/.logs\/www-error.log; notranslate\" title=\"\/web\/example.com\/.logs\/www-error.log\">\r\n&#x5B;Sat Dec 19 22:13:00.127794 2015] &#x5B;proxy:error] &#x5B;pid 82692] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket \/tmp\/fpm_www_example_com.sock (localhost) failed\r\n&#x5B;Sat Dec 19 22:13:00.128004 2015] &#x5B;proxy:error] &#x5B;pid 82692] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s\r\n&#x5B;Sat Dec 19 22:13:00.128038 2015] &#x5B;proxy_fcgi:error] &#x5B;pid 82692] &#x5B;client 84.74.50.9:65039] AH01079: failed to make connection to backend: httpd-UDS\r\n\r\n&#x5B;...]\r\n\r\n&#x5B;Sun Dec 20 11:39:18.535056 2015] &#x5B;core:error] &#x5B;pid 82705] (13)Permission denied: &#x5B;client 84.74.50.9:56498] 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\r\n<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4444","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/4444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4444"}],"version-history":[{"count":8,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/4444\/revisions"}],"predecessor-version":[{"id":4479,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/4444\/revisions\/4479"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}