Loading... 我们可以使用 Nginx 来配置 Stable Diffusion 的反向代理,实际上主要的工作量也就是如何让 Nginx 反向代理我们的 WebUI 监听的端口,并且这个端口需要同时支持 WS 和 HTTP 协议。 编辑nginx 的 Conf 文件,添加: ```nginx http { #自定义变量 $connection_upgrade map $http_upgrade $connection_upgrade { default keep-alive; #默认为keep-alive 可以支持 一般http请求 'websocket' upgrade; #如果为websocket 则为 upgrade 可升级的。 } } ``` 然后,在 `site-avaliable` 中添加: ```nginx server { location / { proxy_pass http://127.0.0.1:7890; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } } ``` 最后修改:2023 年 09 月 18 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果你觉得文章帮到你了,请以沫喝杯奶茶吧~