Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我想两个版本php,这样但是ngnix找不到fpm,site1也改成了 9072 9056,想问你我这种写法有错吗,谢谢了 #26

Closed
guoweibo opened this issue Apr 10, 2018 · 1 comment

Comments

@guoweibo
Copy link

php72:
build: ./php/php72/
ports:
- "9072:9072"
expose:
- "9072"
volumes:
- ./www/:/var/www/html/:rw
- ./conf/php72/php.ini:/usr/local/etc/php/php.ini:ro
- ./conf/php72/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php-fpm-72/:/var/log/php-fpm/:rw
links:
- mysql:mysql

php56:
build: ./php/php56/
ports:
- "9056:9056"
expose:
- "9056"
volumes:
- ./www/:/var/www/html/:rw
- ./conf/php56/php.ini:/usr/local/etc/php/php.ini:ro
- ./conf/php56/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php-fpm-56/:/var/log/php-fpm/:rw
links:
- mysql:mysql

@yeszao
Copy link
Owner

yeszao commented Apr 11, 2018

Nginx下面是怎么配置的?
大概要配置成,docker-compose.yml的nginx:

links: 
    - php72:fpm72
    - php56:fpm56

nginx的conf配置:
一个站点:

fastcgi_pass   fpm72:9072;

另外一个站点:

fastcgi_pass   fpm56:9056;

@yeszao yeszao closed this as completed Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants