Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设置 site_url 之后 base_path 同时指向了 site_url 导致访问不正常 #1830

Closed
4 tasks done
EndCredits opened this issue Sep 27, 2022 · 4 comments
Closed
4 tasks done
Labels
bug Something isn't working

Comments

@EndCredits
Copy link

EndCredits commented Sep 27, 2022

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure it's due to alist and not something else(such as Dependencies or Operational).
  • I'm sure I'm using the latest version

Alist Version / Alist 版本

v3.0.2

Driver used / 使用的存储驱动

local

Describe the bug / 问题描述

注: 由于文件服务器已切换至 alist v3.0.1 ,故下文中原本的 问题链接正常访问链接 互换

我正在试图搭建一个文件下载站,本地运行 alist 守护进程并使用 caddy 进行反向代理,由于原本的 api_url 字段已被弃用,所以我按照文档设定了 site_urlhttps://mirrors.lewa-revived.work

在设置之后执行 sudo systemctl restart alist 重启了 alist,发现网页 ( https://mirrors.lewa-revived.work ) 无法正常访问,显示为空

image

排查页面源代码之后发现 base_path 字段同时也指向了 /mirrors.lewa-revived.work

这时访问 https://mirrors.lewa-revived.work/mirrors.lewa-revived.work , 发现恢复正常

image

建议: 重新加入 base_path 字段避免类似的情况发生,同时方便子目录反向代理的设置

临时解决方案: 回退至版本 v3.0.1 或 revert commit 7c32af4 并重新编译

感谢 alist 开发人员, 辛苦了!

Reproduction / 复现链接

问题链接: https://mirrors.lewa-revived.work

正常访问链接: https://mirrors.lewa-revived.work/mirrors.lewa-revived.work/

Logs / 日志

见上方
@EndCredits EndCredits added the bug Something isn't working label Sep 27, 2022
@welcome
Copy link

welcome bot commented Sep 27, 2022

Thanks for opening your first issue here! Be sure to follow the issue template!

@crazy0x70
Copy link

谢谢,我也遇到了一样的问题,希望作者尽快出一个修复版本吧

@xhofe xhofe closed this as completed in b747965 Sep 27, 2022
@ghost
Copy link

ghost commented Sep 30, 2022

楼主好,请问您是怎么弄域名挂载alist的呢,小弟也想弄一个,谢谢啦

@crazy0x70
Copy link

楼主好,请问您是怎么​​弄域名挂载的呢,也想弄一个,谢谢啦

反代端口就好了...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants