无法从apache访问php-fpm容器
我在我的Ubuntu机器上安装了最新的Nextcloud容器。
它使用以下命令成功启动:
sudo docker run --name nextcloud --link mysql:mysql -p 9000:9000 -v /data/nextcloud:/var/www/html -d nextcloud:latest
命令sudo docker logs nextcloud
显示:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message [Mon Mar 13 09:41:24.786941 2017] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.10 (Debian) PHP/5.6.30 configured -- resuming normal operations [Mon Mar 13 09:41:24.787013 2017] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
我在主机的Apacheconfiguration上启用了mod_proxy和mod_proxy_fcgi,所以这不在另一个docker容器内运行。
ProxyPreserveHost On ProxyPass "/cld" "fcgi://127.0.0.1:9000" ProxyPassReverse "/cld" "fcgi://127.0.0.1:9000"
打开URL时,出现错误503服务不可用。
Apache错误日志显示:
[Mon Mar 13 11:08:35.102072 2017] [proxy_fcgi:error] [pid 11783:tid 140492205455104] [client 2001:a61:186:d601:f898:e50c:c181:db75:52659] AH01067: Failed to read FastCGI header [Mon Mar 13 11:08:35.102119 2017] [proxy_fcgi:error] [pid 11783:tid 140492205455104] (104)Connection reset by peer: [client 2001:a61:186:d601:f898:e50c:c181:db75:52659] AH01075: Error dispatching request to : [Mon Mar 13 11:08:36.866618 2017] [proxy_fcgi:error] [pid 11783:tid 140492197062400] (104)Connection reset by peer: [client 2001:a61:186:d601:f898:e50c:c181:db75:52660] AH01075: Error dispatching request to : (sending empty stdin) [Mon Mar 13 11:08:38.263875 2017] [proxy_fcgi:error] [pid 11783:tid 140492180276992] [client 2001:a61:186:d601:f898:e50c:c181:db75:52664] AH01067: Failed to read FastCGI header [Mon Mar 13 11:08:38.263914 2017] [proxy_fcgi:error] [pid 11783:tid 140492180276992] (104)Connection reset by peer: [client 2001:a61:186:d601:f898:e50c:c181:db75:52664] AH01075: Error dispatching request to :
我错过了什么?
我认为使用nextcloud:latest
,你使用Apache获取图像,而不是使用fpm
的图像。
尝试使用nextcloud:fpm
与您的代理设置,或使用没有代理的默认图像(即直接访问它)。
- Docker nginx dev反向代理定期死亡
- 使用nginx-proxy容器(如前端服务器)访问同一主机上的多个容器时出现错误503
- IIS反向代理到虚拟专用IP
- Docker上的Nginx反向代理和卸载的资产
- 对于jwilder / nginx-proxy大于8kb / 16KB(和2MB)的文件,Laravel POST TokenMismatchException
- Nginx的docker容器将不会代理Web应用程序容器
- 防止redirect到https和URI hack nginx反向代理
- docker集装箱之间redirect的最佳做法
- Docker-compose traefik PathPrefixStrip不能正常工作