nginx 的配置文件:
server {
listen 80;
server_name 127.0.0.1
charset UTF-8;
access_log /var/log/nginx/myweb_access.log;
error_log /var/log/nginx/myweb_error.log;
client_max_body_size 75M;
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8023;
uwsgi_read_timeout 2;
}
location /static {
expires 30d;
autoindex on;
add_header Cache-Control private;
alias /home/work/JZAssist/collected_static/;
}
}
我的 supervisord 中的 command 是
command=uwsgi --http :8023 --chdir /home/work/xxxx --module xxxx.wsgi
xxxx 是项目名称。 问题是可以通过域名加端口访问,但是直接用域名访问就出现 504 Gateway Time-out 。我重装过 nginx,但看起来好像并不是 nginx 的问题。