rampageX
免费用户 注册时间:2021-10-02 01:24
  • 本地部署了 kkFileView,设置填了 http://127.0.0.1:8012,但是预览还是提示 127.0.0.1 拒绝访问,确认 kk 已经成功启动并且监听 8012了,还是这个地址需要填公网 IP?
  • @lgs821 很奇怪,我反代其他的程序也会出现这个问题,必须加上那个块,比如 cloudreve, metube
  • 已解决,参考宝塔那个教程,反代还需要上面 `location ~* \.(gif|png|jpg|css|js|woff|woff2)$` 那一块代码:

    location ~* \.(gif|png|jpg|css|js|woff|woff2)$ {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_redirect off;
    proxy_pass http://127.0.0.1:3030;
    }

    location / {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_redirect off;
    proxy_pass http://127.0.0.1:3030;
    }


    https://img.imxcz.com/markdown/2021-09/16/003844-U47jRM.png
1