我正在將 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 回答
- 0 關注
- 236 瀏覽
添加回答
舉報
0/150
提交
取消