docs icon indicating copy to clipboard operation
docs copied to clipboard

更新 子目录反向代理 配置

Open skyczhao opened this issue 1 year ago • 2 comments

删除proxy_pass的/alist路径,路径是被代理服务器使用,alist服务作为源就不需要添加

skyczhao avatar Oct 26 '24 00:10 skyczhao

Deploy Preview for alist-doc ready!

Name Link
Latest commit b9acdf1599b503785df1c5ea7a91d14d4692a464
Latest deploy log https://app.netlify.com/sites/alist-doc/deploys/671c3dc71c9515000884ccec
Deploy Preview https://deploy-preview-386--alist-doc.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 26 '24 00:10 netlify[bot]

删除proxy_pass的/alist路径,路径是被代理服务器使用,alist服务作为源就不需要添加

https://github.com/AlistGo/docs/pull/386/commits/b9acdf1599b503785df1c5ea7a91d14d4692a464#diff-17dc5ccadd4530359f60f32d0a8ef2f3bad760961d349e7cf290bfa84bc2999fL41

我没记错的话

location /alist/ {
    proxy_pass http://127.0.0.1:5244/      # 不带目录

这样的话,当访问 http://your-domain/alist/path 时,请求会被转发到 http://127.0.0.1:5244/path

location /alist/ {
    proxy_pass http://127.0.0.1:5244/alist;   # 末尾不带斜杠

请求 /alist/path → 会转发到 http://127.0.0.1:5244/alistpath

文档中应该是正确的。

Troray avatar Dec 24 '24 10:12 Troray