【发布时间】:2015-07-06 04:45:37
【问题描述】:
我有下一个docker-compose 文件:
nginx:
build: .
ports:
- "80:80"
- "443:443"
links:
- fpm
fpm:
image: php:fpm
ports:
- "9000:9000"
Dockerfile 命令列表是:
FROM nginx
ADD ./index.php /usr/share/nginx/html/
# Change Nginx config here...
Nginx 服务器工作正常,我可以在http://localhost/index.html 上看到默认的 html 页面,但不要执行 PHP 脚本。所以当我得到http://localhost/index.php - 浏览器下载PHP文件而不是执行它们。
在我的情况下,如何使用自定义 Nginx 配置来执行 PHP 脚本?
【问题讨论】:
标签: php nginx docker dockerfile docker-compose