circlestarzero / EX-chatGPT

Let ChatGPT truly learn how to go online and call APIs! 'EX-ChatGPT' can rival and even surpass NewBing
MIT License
2.01k stars 331 forks source link

部署成功,无法访问 #51

Open gaye746560359 opened 1 year ago

gaye746560359 commented 1 year ago

image docker部署成功,但是访问http://ip:5000错误 image

assassinliujie commented 1 year ago

我也是,搞一晚上了。docker dockercompose还有手动部署都不行

assassinliujie commented 1 year ago

image docker部署成功,但是访问http://ip:5000错误 image

试了下,用localhost可以访问,所以应该是nginx没弄好

assassinliujie commented 1 year ago

image docker部署成功,但是访问http://ip:5000错误 image

确实是nginx没配,这项目自己的web服务器可能没有监听本地IP

onlyLTY commented 1 year ago

如果需要部署在服务器,可以反代一下。

gaye746560359 commented 1 year ago

image docker部署成功,但是访问http://ip:5000错误 image

确实是nginx没配,这项目自己的web服务器可能没有监听本地IP

如何配置nginx

gaye746560359 commented 1 year ago

如果需要部署在服务器,可以反代一下。

添加了反代理,提示错误如下 image

onlyLTY commented 1 year ago

如果需要部署在服务器,可以反代一下。

添加了反代理,提示错误如下 image

#PROXY-START/

location /
{
    proxy_pass http://127.0.0.1:5000;
    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 REMOTE-HOST $remote_addr;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_http_version 1.1;
    # proxy_hide_header Upgrade;

    add_header X-Cache $upstream_cache_status;
    #Set Nginx Cache

    set $static_fileBW56fcQl 0;
    if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
    {
        set $static_fileBW56fcQl 1;
        expires 1m;
    }
    if ( $static_fileBW56fcQl = 0 )
    {
        add_header Cache-Control no-cache;
    }
}
#PROXY-END/

这个是我的配置。我这测试可以正常访问

gaye746560359 commented 1 year ago

image 配置报错

onlyLTY commented 1 year ago

image 配置报错

这只是反代的那部分,其他需要你自己补全。实在不行用宝塔设置吧

onlyLTY commented 1 year ago

然后我试了下,防火墙打开5000端口后,ip:5000是能正常访问的。请确认防火墙设置 image

gaye746560359 commented 1 year ago

然后我试了下,防火墙打开5000端口后,ip:5000是能正常访问的。请确认防火墙设置 image

确实是防火墙,服务器默认的是打开的。重新配置了。确实可以了。感谢