1Panel icon indicating copy to clipboard operation
1Panel copied to clipboard

[FEATURE] 反向代理站点能否支持同时配置静态网站?

Open WankkoRee opened this issue 2 years ago • 6 comments

1Panel 版本

1.5.5

请描述您的需求或者改进建议

当前的反向代理站点没有静态网站相关配置,需要自己在配置文件中修改才行。

但实际上这个需求在前后端分离项目中还挺常见的,/负责提供静态页,/api负责提供反向代理出来的接口。

请描述你建议的实现方案

No response

附加信息

No response

WankkoRee avatar Sep 06 '23 03:09 WankkoRee

感谢反馈,后续版本调研一下实现上述需求的具体方案。

麻烦提供一下目前手动修改后的配置文件。

wanghe-fit2cloud avatar Sep 06 '23 09:09 wanghe-fit2cloud

现在是把伪静态功能当非侵入式的自定义配置文件功能用了,具体片段如下:

root /www/sites/www.xxx.com/index;

location / {
    try_files $uri $uri/ /index.html;
    index  index.html;
}

主要就是指定了一下根目录,然后配一下vue的路由伪静态。(话说这种vue/react的路由伪静态片段是不是也可以加到预定义的伪静态方案中)

WankkoRee avatar Sep 07 '23 09:09 WankkoRee

收到,后续版本调研一下。

wanghe-fit2cloud avatar Sep 07 '23 09:09 wanghe-fit2cloud

这个问题算是 1panel 功能设计上的问题,新建时选择静态站点,之后再添加反向代理就没有这样的问题。

我会提新的issues,会同时解决这个问题。

yutangbb avatar Oct 12 '23 13:10 yutangbb

请问这个问题有进展吗?

maninhill avatar Dec 19 '24 13:12 maninhill

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is there any progress on this issue?

wanghe-fit2cloud avatar Dec 19 '24 13:12 wanghe-fit2cloud