美文网首页问题
An error has occurred. nginx报错日志

An error has occurred. nginx报错日志

作者: musk | 来源:发表于2024-01-16 10:21 被阅读0次

花生壳内网穿透代理https网站报错:An error has occurred.

第一步:搭建一个nginx将 https 转成 http,然后再花生壳上配置http+端口即可

如果报错:An error has occurred. 然后查看nginx日志,如果报403,需要配置如下参数

      proxy_http_version 1.1;        #Nginx在与Node后端通信时使用HTTP/1.1,是WebSockets所必需的
      proxy_set_header Origin '';
      proxy_set_header Upgrade $http_upgrade;    #Nginx响应升级请求,当浏览器想要使用WebSocket时,该请求由HTTP启动
      proxy_set_header Connection "Upgrade";

https://www.cnblogs.com/fan-gx/p/nginx.html

可用配置(nginx http 代理 https网站配置)


    server {
        listen      37754;
        #server_name  local.com;

        # To allow special characters in headers
       # ignore_invalid_headers off;
        # Allow any size file to be uploaded.
        # Set to a value such as 1000m; to restrict file size to a specific value
        #client_max_body_size 10G;
        # To disable buffering
       # proxy_buffering off;

        location / {
            proxy_pass https://192.168.48.110/; # ibmc网站
            #proxy_set_header Host $host;
            #proxy_set_header X-Forwarded-For $remote_addr;
            #proxy_set_header Host $proxy_host;
            proxy_http_version 1.1;        #Nginx在与Node后端通信时使用HTTP/1.1,是WebSockets所必需的
            proxy_set_header Origin '';
            proxy_set_header Upgrade $http_upgrade;    #Nginx响应升级请求,当浏览器想要使用WebSocket时,该请求由HTTP启动
            proxy_set_header Connection "Upgrade";
        }

    }


相关文章

网友评论

    本文标题:An error has occurred. nginx报错日志

    本文链接:https://www.haomeiwen.com/subject/rufnbdtx.html