現在、nginxとfcgiwrapでperl cgiアプリケーションをテストしています。それは部分的に機能しています。しかし、私は応答でエラーを返す問題があります。スーパーバイザー使用時にnginxがfcgiwrapからエラーを返さない
すべてのリクエストは200を返します.cgiエラーの場合は空白のコンテンツが返されます。
私はsupervisordからnginxとfcgiwrapの両方を実行しています。
これは私のsupervisord.confファイルです...
[supervisord]
logfile=/tmp/supervisord.log
nodaemon=true
[fcgi-program:fcgiwrap]
command = /usr/sbin/fcgiwrap
user = www-data
socket = unix:///var/run/supervisor/%(program_name)s.sock
socket_owner = www-data:www-data
socket_mode = 0770
autorestart=true
autostart=true
startsecs=1
startretries=3
stopsignal=QUIT
stopwaitsecs=10
environment=PATH='/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin'
redirect_stderr=false
stdout_logfile=/var/log/fcgiwrap_out.log
stderr_logfile=/var/log/fcgiwrap_err.log
[program:nginx]
command=/usr/sbin/nginx -g 'daemon off;'
私は/var/log/fcgiwrap_err.logに表示されてエラーが発生します。しかし、エラーメッセージ、さらに重要なのは、nginxに返されません。
これは、私は問題がfcgiwrap、nginxの、またはsupervisordの設定ミスが原因であるかどうかわからないんだけど、私のnginxの設定ファイル...
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/web;
index index.html index.cgi;
server_name _;
location/{
try_files $uri $uri/ =404;
}
location ~ \.cgi$ {
gzip off;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/supervisor/fcgiwrap.sock;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME /var/www/web$fastcgi_script_name;
}
# deny access to .htaccess files
location ~ /\.ht {
deny all;
}
}
です。
ありがとうございました。私はスーパーバイザー(またはドッカー)を使用していないまったく異なるアーキテクチャーになってしまいましたが、これは問題のように聞こえるでしょう。私は古いソースコードを掘り起こして試してみることができます。 – user1751825