跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • nginx 配置的问题
未分類
29 11 月 2020

nginx 配置的问题

nginx 配置的问题

資深大佬 : longmeier90 3

我想实现 tstwx.bolineyecare.com/2.jpeg, 访问的是我服务器 /home/data/wx-webview/checkin/dist 目录下的图片。 但是当我访问的时候图片显示不了,状态码 200,不知道我的问题出在哪里啦。

server {

    listen       443;     server_name  tstwx.bolineyecare.com;     root /home/data/wx-webview/;      location /checkin/{           alias /home/data/wx-webview/checkin/dist/;           #try_files $uri/ $uri/;           autoindex on;    }    location / {         try_files $uri $uri/ @router;         index index.htm index.html;   }    location @router {      add_header    Cache-Control no-store;      rewrite ^.*$ /index.html last;   }   location /statics/ {         # add_header    Cache-Control no-store;         valid_referers none blocked *.bolineyecare.com;         if ($invalid_referer) {             return 403;         }        alias /data/statics/;        expires 365d;   }   location /~.(jpg|jpeg|gif|png|ico|css|js|pdf|txt)$ {        root /home/data/wx-webview/checkin/dist/;        expires -1;   } 

}

大佬有話說 (0)

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具