Changed PHP-FPM host to IPv4 address to avoid connecting over IPv6

This commit is contained in:
Tim de Pater 2017-03-28 14:05:04 +02:00
parent acdeb2cbbb
commit 31c77e866f
2 changed files with 2 additions and 7 deletions

View File

@ -1,7 +1,7 @@
Docker PHP-FPM 7.1 & Nginx 1.10 on Alpine Linux Docker PHP-FPM 7.1 & Nginx 1.10 on Alpine Linux
============================================== ==============================================
Example PHP-FPM 7.1 & Nginx 1.10 setup for Docker, build on [Alpine Linux](http://www.alpinelinux.org/). Example PHP-FPM 7.1 & Nginx 1.10 setup for Docker, build on [Alpine Linux](http://www.alpinelinux.org/).
The image is only +/- 60MB large. The image is only +/- 35MB large.
[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/alpine-nginx-php7.svg)](https://hub.docker.com/r/trafex/alpine-nginx-php7/) [![Docker Pulls](https://img.shields.io/docker/pulls/trafex/alpine-nginx-php7.svg)](https://hub.docker.com/r/trafex/alpine-nginx-php7/)
@ -13,8 +13,3 @@ Start the Docker containers:
docker run -p 80:80 trafex/alpine-nginx-php7 docker run -p 80:80 trafex/alpine-nginx-php7
See the PHP info on http://localhost, or the static html page on http://localhost/test.html See the PHP info on http://localhost, or the static html page on http://localhost/test.html
Resources & inspiration
-----------------------
https://ejosh.co/de/2015/09/how-to-link-docker-containers-together
https://github.com/johanan/Ansible-and-Docker

View File

@ -47,7 +47,7 @@ http {
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404; try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass localhost:9000; fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php; fastcgi_index index.php;