php-fpm
docker pull PHP:2.4-alpine
nginx.conf
fastcgi_pass 127.0.0.1:9000;
php-fpm 在容器裏的 nginx.conf
location /php { proxy_set_header Host $host:$server_port; proxy_pass http://138.38.38.111:80/; }
php-fpm
listen = /tmp/php-fpm.sock
nginx.conf
fastcgi_pass unix:/tmp/php-fpm.sock;
php-fpm用ip:port方式創建連接, nginx不要用unix socket方式創建連接,用ip:port方式創建鏈接就行