1.下载Apache

docker pull httpd:2.4-alphine

2.下载PHP-fpm

docker pull php: 7.3.1-fpm-alpine3.8

 3.php+fpm+apache

  1. 映射一个apache配置文件,去官网看configuration/usr/local/apache2/conf/httpd.conf

  2. 拷贝到本地docker cp myweb:/usr/local/apache2/conf/httpd.conf .

  3. 修改本地Apache配置文件

     1.去除三个地方的注释(mod_proxy.so,/mod_proxy_http.so , modules/mod_proxy_fcgi.so )
    

    php+fpm+apache-LMLPHP

     2.干掉默认配置
    

    php+fpm+apache-LMLPHP

     拷贝代码
    
<VirtualHost *:8087>
    ServerAdmin ceshi.com
    DocumentRoot "/usr/local/apache2/htdocs"
    ServerName localhost
    <Directory "/usr/local/apache2/htdocs">
     Options None
     Require all granted
    </Directory>
    ProxyRequests Off
    ProxyPassMatch ^/(.*\.php)$ fcgi://172.17.0.2:9000/php/$1
</VirtualHost>

01-28 10:40