私はローカルでWebサイトを実行していますが、すべてのトラフィックはNGinxを介してルーティングされ、NGinxはPHPページへのリクエストをApacheにディスパッチし、静的ファイルを提供します。Chrome、Safari、IEなどで完全に機能します。
ただし、FirefoxでWebサイトを開くと、次のエラーが発生します。
502 Bad Gateway
nginx/0.7.65
キャッシュとCookieをクリアしてからFireFoxを再起動すると、エラーが返される前にサイトを1回または2回ロードできます。Firefox 3.6と3.5の両方を試しましたが、どちらも同じ問題があります。
Nginxの設定は次のようになります。
worker_processes 2;
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name local.mysite.amc;
root /Users/joshmaker/Sites/mysite;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://local.mysite.amc:8080;
}
include /opt/local/etc/nginx/rewrite.txt;
}
server {
include /opt/local/etc/nginx/mime.types;
listen 80;
server_name local.static.mysite.amc;
root /Users/joshmaker/Sites/mysite;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
}
}
そして、Firefoxがerror.logファイルで生成するエラーは次のとおりです。
[error] 11013#0: *26 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream
[error] 11013#0: *30 upstream sent too big header while reading response header from upstream
[error] 11013#0: *30 no live upstreams while connecting to upstream
ブラウザがサーバーエラーを引き起こす理由は完全に途方に暮れています。誰かが助けることができますか?