我在显示我们的css和js文件时遇到问题,如果我前往他们的路径,它很简单地向我显示索引,就好像它重定向它一样,但是没有提供重定向信息的状态等等只是一个简单的200 < / p>
这里是配置
http {
server {
listen [::]:80;
server_name _;
if ($host ~* ^www\.(.+)$) {
return 301 $scheme://$1$request_uri;
}
proxy_http_version 1.1;
proxy_request_buffering off;
client_max_body_size 0;
client_body_buffer_size 1024k;
client_body_timeout 120s;
proxy_buffering off;
location ~ \.(js|jpg|jpeg|png|gif|png|css|eot|svg|svgz|ttf|woff|woff2|webp|ico) {
root /path/themes/gallery_002/templates/;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://localhost:8000/;
}
}
}
events { worker_connections 1024;
现在是文件结构
├── css
│ ├── layout.css
│ ├── main-responsive.css
│ ├── main.css
│ ├── meanmenu.min.css
│ ├── responsive.css
│ └── style.css
├── images
│ ├── blank.gif
│ ├── logo.png
│ └── timeline_line.png
├── js
│ ├── custom.js
│ ├── imagesloaded.pkgd.min.js
│ ├── isotope.pkgd.min.js
│ ├── jquery.meanmenu.min.js
│ └── modernizr.min.js
├── templates
│ ├── base.html
│ ├── index.html
│ ├── query.html
│ └── sitemap.html
我不确定我做错了什么,提前谢谢。
更新:
似乎没有将css文件视为.css文件,
Request Method:GET
Status Code:200 OK
Remote Address:127.0.0.1:8008
Referrer Policy:no-referrer-when-downgrade
Response Headers
view source
Connection:close
Content-Length:9928
Content-Type:text/html; charset=utf-8
Request Headers
view source
我在chrome中看到了这个
Resource interpreted as Stylesheet but transferred with MIME type text/html