iKuai爱快流控路由

标题: 路由器管理平台通过nginx转发无法访问 [打印本页]

作者: gexiaopeng    时间: 2023-8-2 14:16
标题: 路由器管理平台通过nginx转发无法访问
家里的爱快路由器管理平台(版本免费版3.7.4 x64 Build202307111447),通过 http://192.168.1.1 可以正常访问,但通过nginx转发到 http://192.168.1.1 却无法访问,页面空白,查看页面网络连接,发现css与js文件的http状态码是404,这个是什么原因?
下面截图是通过nginx转发,css与js报404错误

(, 下载次数: 22)

下面截图是通过http://192.168.1.1可以正常访问
(, 下载次数: 22)


作者: gexiaopeng    时间: 2023-8-2 14:20
补充一下nginx配置:

方式一:
location / {
                                proxy_pass  http://192.168.1.1;
    }

方式二:
       
         location / {
                                proxy_pass  http://192.168.1.1;
                                proxy_set_header  Host  $http_host;
                                proxy_set_header  X-Real-IP  $remote_addr;
                                proxy_set_header  REMOTE-HOST  $remote_addr;
                                proxy_set_header  X-Forwarded-For  $remote_addr;
                                proxy_set_header  remote-port  $remote_port;
    }

两种方式都一样出错。
作者: gexiaopeng    时间: 2023-8-2 16:44
已经解决,在nginx的 location模块里面加上proxy_http_version 1.1;
作者: muzichun    时间: 2023-9-13 10:12
感谢分享




欢迎光临 iKuai爱快流控路由 (https://bbs.ikuai8.com/) Powered by Discuz! X3.3