单位电脑stable diffusion开启远程连接后(增加了-listen参数)会无法在线安装扩展。
![图片[1]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-4-1024x532.png)
我又想在家中访问web-ui。可以使用nginx 反向代理来实现。
1.安装使用phpstudy,或者手动安装nginx。
2.开启nginx服务,并新建一个网站。IP设置 127.0.0.1
![图片[2]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-5-1024x821.png)
![图片[3]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-6-1024x828.png)
3.设置这个网站的conf文件
![图片[4]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-7-1024x805.png)
![图片[5]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-8-1024x802.png)
![图片[6]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-9-1024x666.png)
![图片[7]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-10-1024x629.png)
![图片[8]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-11-1024x574.png)
![图片[9]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-12.png)
server {
listen 7860;
server_name 127.0.0.1;
root "D:/phpstudy_pro/WWW/127.0.0.1";
location / {
proxy_pass http://127.0.0.1:7850;
}
}
3.重启nginx
![图片[10]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-13-1024x801.png)
4.你可以使用本机IP访问了, 或者在路由器开放防火墙端口。
![图片[11]-stable diffusion webui开启互联网访问(开放远程连接),不使用 –listen参数-起风啦](https://home.qifeng.la/wp-content/uploads/2023/04/image-14-1024x613.png)
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END







