php 与 nginx 的两种处理方式
1.IP:Port 监听方式
php-fpmdocker pull PHP:2.4-alpinenginx.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/; }
2.UDS 方式监听
php-fpmlisten = /tmp/php-fpm.socknginx.conf
fastcgi_pass unix:/tmp/php-fpm.sock;
3.注意
php-fpm用ip:port方式建立链接,nginx不要用unix socket方式建立链接,用ip:port方式建立连接就行