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

[建议] 后端是动态域名时无法代理 #893

Open
ygrdsj opened this issue May 28, 2024 · 2 comments
Open

[建议] 后端是动态域名时无法代理 #893

ygrdsj opened this issue May 28, 2024 · 2 comments

Comments

@ygrdsj
Copy link

ygrdsj commented May 28, 2024

背景与遇到的问题

后端是动态域名时,nginx需要配置set $backend=http://xxx.com, proxy_pass $backend才能更新动态域名解析出的IP,现在WAF不能代理类似$backend这样的参数

建议的解决方案

希望WAF可以代理到$backend这样的参数

@Lvshujun0918
Copy link
Contributor

可以自己到proxy_params里面设置,参见官网文档

@ygrdsj
Copy link
Author

ygrdsj commented May 29, 2024

根据这个方法配置:https://waf-ce.chaitin.cn/docs/faq/other#自定义站点-nginx-conf
1、set $backend=http://xxx.com/; proxy_pass $backend; 都配置到custom_params/backend_XXX,不注释IF_backend_XXX中的proxy_pass,nginx -t报错;
2、set $backend=http://xxx.com/; proxy_pass $backend; 都配置到custom_params/backend_XXX,注释IF_backend_XXX中的proxy_pass,Web控制台报错,无法再修改相关站点的配置;
3、只把 set $backend=http://xxx.com/; 配置到custom_params/backend_XXX,修改IF_backend_XXX中的proxy_pass为proxy_pass $backend; 容器重启或者修改配置后IF_backend_XXX中的proxy_pass会还原成原来的状态
综上均达不到完美代理动态域名的目的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants