我的nginx在网页的静态文件上遇到了一些问题
目前查看网页上解析出来css的地址在http://138.128.197.124/static...
我的location部分这么写的
location /static/ {
alias /root/djangoBlog/jasonBlog/static/;
}
确认过所有的static文件都是在这个目录下面的,想请问下为何无法访问呢
在想是不是因为我监听的是8077端口,这里的css地址也应该是ip:8077?请问该如何修改呢
迷茫2017-04-18 09:40:34
Thank you for your help. I found the problem. The permissions I configured for nginx were not enough. I will fix it after modifying it.
PHP中文网2017-04-18 09:40:34
You can only forward it if you request the port you are listening on in nginx. You requested port 80, so naturally it cannot be found.
阿神2017-04-18 09:40:34
location /static/ {
alias /root/djangoBlog/jasonBlog/static/;
}
Just put this part on port 80
Or you can proxy port 8077 under port 80