我正在运行 Ubuntu 10.04、Django 1.3、Nginx 0.8.54 和 uWSGI 0.9.7。
Nginx 和 uWSGI 都可以正常加载。但是,当您访问我的网站时,它会停留很长时间,然后最终加载“504 网关超时”错误。
这是我的 Nginx 虚拟主机 conf 文件:
server {
listen 80;
server_name www.mysite.com mysite.com;
error_log /home/mysite/log/error.log;
access_log /home/mysite/log/access.log;
location / {
auth_basic "Restricted";
auth_basic_user_file /home/mysite/public/passwd;
include uwsgi_params;
uwsgi_pass unix:///home/mysite/public/myapp.sock;
}
location /media {
alias /home/mysite/public/myapp/media;
}
error_page 401 /coming_soon.html;
location /coming_soon.html {
root /home/mysite/public/error_pages/401;
}
location /401/images {
alias /home/mysite/public/error_pages/401/images;
}
location /401/style {
alias /home/mysite/public/error_pages/401/style;
}
}
我的网站日志显示:
SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request / !!!
我的错误日志显示:
upstream timed out (110: Connection timed out) while reading response header from upstream
我在这台服务器上有两个其他站点具有相同的配置,它们加载完美。
有没有其他人遇到过这个问题?这里有几个与我的问题相似的线程,我已经尝试了其中的几个解决方案,但似乎没有任何效果。
预先感谢您的帮助!