用nginx的proxy出的FTP錯誤
環境
源伺服器使用apache作為web伺服器
用nginx做代理分流配置如下
server {
listen 80;
server_name yourdomain.com;
location / {
access_log off;
proxy_pass http://yourvirtualserver;
}
}
發覺從nginx伺服器進入的用戶在使用ftp上傳文件時出現500錯誤,或者直接報ftp無法連接,但是在源伺服器上使用ftp一切正常
日誌錯誤為
(104)Connection reset by peer: mod_fcgid: can't get data from http client, referer:
mod_fcgid: stderr: PHP Warning: ftp_nlist() expects parameter 1 to be resource, boolean given in
加大了fastcgi的超時時間無果,如下,<IfModule mod_fcgid.c>
AddHandler fcgid-script .php .php5
SocketPath /tmp/fcgid.sock
IdleTimeout 600
ProcessLifeTime 3600
MaxProcessCount 100
MaxProcessCount 16
DefaultMinClassProcessCount 5
DefaultMaxClassProcessCount 16
IPCConnectTimeout 1500
IPCCommTimeout 3600
</IfModule>
求解
[火星人
]
用nginx的proxy出的FTP錯誤已經有855次圍觀
http://coctec.com/docs/service/show-post-15964.html