簡體   English   中英

無法從apache訪問php-fpm容器

[英]Can't access php-fpm container from apache

我已經在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'

我在主機的Apache配置上啟用了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 Service Unavailable。
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 ,或者在不使用代理的情況下使用默認映像(即直接訪問它)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM