【发布时间】:2017-06-30 00:17:12
【问题描述】:
我有一个带有 virtualenv 的 centOS,我可以在我的 localhost 中使用该项目,但是当项目上传到服务器时出现错误:
502 - 网关错误
我认为问题可能出在我的 nginx 文件中。
server {
listen 80;
server_name www.site.com.br site.com.br;
root /var/www/html/agrodez/src/;
if ($http_host != "www.site.com.br") {
rewrite ^ http://site.com.br$request_uri permanent;
}
location /static/ {
alias /var/www/html/site/src/sistema/static/;
}
location /{
proxy_pass http://localhost:8000;
include /etc/nginx/proxy_params;
}
【问题讨论】: