-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
部署到服务器后,使用nginx端口转发后发现所有的按钮全都链接超时了 #155
Comments
想问一下,如何使用ip访问,后台nohup挂起后无法在控制台获取公用url的域名地址,使用ip端口进入链接超时 |
没有听懂,运行后直接用ip访问就行 |
可能是我服务器端口出了问题,我设置的端口无法访问,现在可以访问了,但是提交东西会显示error |
你好,请问问题解决了吗,我也是用的nginx代理,也是可以打开界面但是使用具体功能的时候报错error,另一个gradio的地址就可以正常使用 |
和websocket有关吧 |
发现只要设置密码,局域网访问就会connection error, |
|
尝试了官方 wiki 的这个,没有成功。。。请问你这段代码是在哪里找到(试了好像也没效果 map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream my_chataca {
server 127.0.0.1:<端口>;
}
server {
listen 80;
listen [::]:80;
server_name <域名>;
location / {
proxy_pass http://my_chataca;
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 Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
} |
个人在韩区服务器部署的服务,直接用 git clone 部署,目前情况:
问题应该有两个:重定向问题和密码问题。 |
同样没有成功。 |
终于成功部署了。 像上面写的: nginx 配置 内容为:
在上级目录里 编辑
主要是添加了
然后就可以通过域名访问了。注意,这里端口是80,不是443. 我是域名用cloudflare解析的。 没有开启ssl. 这里有教程 https://defunctions.com/cdn/http_to_https_by_cf.html 可以“使用CloudFlare将不配置SSL的http源站转换成https” |
-- 密码问题应该是 gradio 在 http 下 ws 问题, 加了证书 变成 wss 应该没事, -- 我修改了 routes.py 就好了, docker 我不是很熟, 粗略修改, 但是对我有效
docker exec -it xxx /bin/bash
sed -i s/websocket\.cookies\.get\(\"access-token\"\)/websocket.cookies.get\(\"access-token-unsecure\"\)/g /usr/local/lib/python3.11/site-packages/gradio/routes.py
docker restart xxx |
使用CloudFlare将不配置SSL的http源站转换成https,按照这个方法搞定了,非常感谢! |
你好,我在本地运行了两个带密码的webui的实例,分别运行在7861和7862,现在我想通过nginx实现负载均衡,发现无法登陆,以下是我nginx的配置文件:
,而nginx错误日志是:
请问各位大佬如何解决? |
你用了反代,填的通道就不是你的宿主机IP了,直接用http://127.0.0.1:8001; # 注意端口号 |
看报错像是防火墙没开 |
找不到任何.tex文件: private_upload/helede/2024-05-20-05-01-40 |
已经通过DNS解析将<域名>解析到服务器IP上
![image](https://user-images.githubusercontent.com/22783533/228780497-271392e2-b4e5-42ce-8adf-9c09621856c7.png)
只是通过nginx简单的把80端口的请求转发到了这个python工程启动设置的端口(5566)上。
在浏览器输入<域名>可以访问主页面,但发现点击任何按钮都是超时的。
如果在浏览器内输入域名:5566则一切正常。
nginx配置如下图
![image](https://user-images.githubusercontent.com/22783533/228781516-977f327e-16ae-4406-af81-c15bf6268c6f.png)
请有经验的朋友帮下忙 感谢!
The text was updated successfully, but these errors were encountered: