我正在将 docker 与 nginx 一起使用。当我去:http://www.mypage.com一切都很好,但是当我添加 HTTPS 时,它实际上只是下载 index.php。日志中没有写任何内容,所以我不确定从哪里开始解决这个问题。这是我的相关配置:Docker-compose.yml:php: image: myImage ports: - "9000:9001" volumes: - home/me/my-site/:/var/www/symfony:cached - ./logs/symfony:/var/www/symfony/var/log:cached extra_hosts: - "docker-host.localhost:127.0.0.1" - "otherhost:10.5.221.132"nginx: build: ./nginx ports: - "80:80" - "443:443" links: - php volumes: - ./logs/nginx:/var/log/nginx:cached - /home/me/my-site/:/var/www/symfony:cached - ./nginx/my-site.com.crt:/etc/nginx/my-site.com.crt - ./nginx/my-site.com.key:/etc/nginx/my-site.com.key我的码头档案:FROM alpine:3.8RUN apk add --update nginxRUN rm -rf /var/cache/apk/* && rm -rf /tmp/*ADD nginx.conf /etc/nginx/ADD symfony.conf /etc/nginx/conf.d/ADD fastcgi_params /etc/nginx/ADD my-site.com.crt /etc/nginx/ADD my-site.com.key /etc/nginx/RUN echo "upstream php-upstream { server php:9000; }" > /etc/nginx/conf.d/upstream.confRUN adduser -D -g '' -G www-data www-dataCMD ["nginx"]EXPOSE 80EXPOSE 443
1 回答
- 1 回答
- 0 关注
- 221 浏览
添加回答
举报
0/150
提交
取消