我的nginx在网页的静态文件上遇到了一些问题目前查看网页上解析出来css的地址在http://138.128.197.124/static...我的location部分这么写的location /static/ {alias /root/djangoBlog/jasonBlog/static/;}确认过所有的static文件都是在这个目录下面的,想请问下为何无法访问呢在想是不是因为我监听的是8077端口,这里的css地址也应该是ip:8077?请问该如何修改呢
学习是最好的投资!
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.
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.
location /static/ { alias /root/djangoBlog/jasonBlog/static/; }
Just put this part on port 80Or you can proxy port 8077 under port 80
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.
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.
Just put this part on port 80
Or you can proxy port 8077 under port 80