title: How to set up Apache2 and PHP-FPM via unix socket?
body: <p>I try to set up Apache2 and PHP-FPM via unix socket but result is</p>
  
  <p>(111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.2-fpm.sock (*) failed</p>
  
  <p>docker-compose.yml</p>
  
  <pre><code>version: "2"
  services:
      php:
          build: "php:7.2-rc-alpine"
          container_name: "php"
          volumes:
              - "./code:/usr/local/apache2/htdocs"
              - "./php7.2-fpm.sock:/run/php/php7.2-fpm.sock"
      apache2:
          build: "httpd:2.4-alpine"
          container_name: "apache2"
          volumes:
              - "./code:/usr/local/apache2/htdocs"
              - "./php7.2-fpm.sock:/run/php/php7.2-fpm.sock"
          ports:
              - 80:80
          links:
              - php
  </code></pre>
  
  <p>www.conf</p>
  
  <pre><code>listen = /run/php/php7.2-fpm.sock
  </code></pre>
  
  <p>httpd-vhosts.conf</p>
  
  <pre><code>&lt;FilesMatch \.php$&gt;
      SetHandler "proxy:unix:/run/php/php7.2-fpm.sock|fcgi://localhost/"
  &lt;/FilesMatch&gt;
  </code></pre>
  
  <p>But it's work when connect via TCP.</p>
  
  <p>www.conf</p>
  
  <pre><code>listen = 127.0.0.1:9000
  </code></pre>
  
  <p>httpd-vhosts.conf</p>
  
  <pre><code>&lt;FilesMatch \.php$&gt;
      SetHandler "proxy:fcgi://php:9000"
  &lt;/FilesMatch&gt;
  </code></pre>