GO web程序代理绑定域名非常频繁404的问题

LeeChan · 2019-09-20 17:12:52 · 1314 次点击 · 大约8小时之前 开始浏览    置顶
这是一个创建于 2019-09-20 17:12:52 的主题,其中的信息可能已经有所发展或是发生改变。

用nginx做代理 配置文件如下:

server {
        listen 80;
        server_name leechan.online;

        location / {
            proxy_pass http://127.0.0.1:8888;
            proxy_http_version    1.1;
            #proxy_cache_bypass    $http_upgrade;
            proxy_set_header Upgrade            $http_upgrade;
            proxy_set_header Connection         "upgrade";
            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 X-Forwarded-Proto  $scheme;
            proxy_set_header X-Forwarded-Host   $host;
            proxy_set_header X-Forwarded-Port   $server_port;
        }

        access_log    /home/wwwlogs/leechan.online.access.log;
}

但是经常出现404的情况,是非常频繁出现。 IP访问:http://117.50.7.147:8888 域名访问:http://leechan.online

各位大佬能指教一下是什么问题吗


有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1314 次点击  ∙  1 赞  
加入收藏 微博
1 回复  |  直到 2019-09-21 16:55:31
LeeChan
LeeChan · #1 · 6年之前

搞定了,是 nginx 的问题。我把http那部分配置替换了就好了。但是我忘记保留之前那份,所以没能具体是哪点配置的问题。

添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传