Nginx反向代理https忽略证书错误


server {
  server_name esxi.${DOMAIN_NAME};
    listen 80;


  location ^~ / {
    proxy_pass  https://host.docker.internal:7002;
    proxy_set_header Host $proxy_host;
    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-NginX-Proxy true;


    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }


  location ~ \.php$ {
    deny all;
  }
}

关键部分

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

声明:小小博客|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - Nginx反向代理https忽略证书错误


Carpe Diem and Do what I like