配置如下,请大家看看root 的路径对不对 ,还是有别的问题 ,为啥登录
http://123.56.118.211/ 显示的内容是空?
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www/Misago/xiabanzhihou/static;
index index.html index.htm;
# Make site accessible from
http://localhost/
server_name 5dk.cc;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
#try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
proxy_pass
http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
deny all;
}
location /static/ {
root /var/www/Misago/xiabanzhihou/static; #Django项目所在目录
}
}