如何使用ssl跳过证书转发Nginx上的端口?

时间:2018-06-04 14:14:14

标签: ssl nginx

我有一台服务器通过直接IP和端口保持服务响应。 URL示例是:

https://123.45.67.89:8182/

在第一次使用之前,必须跳过浏览器中的SSL证书检查。所以一切都很好,显示红色标题"不安全"在行中划掉了https。

我想配置Nginx只通过域访问服务(没有IP和端口)。我试过这样的解决方案:

server {
    listen      443;
    server_name myservice.domain.my;
    ssl on;
    ssl_verify_client off;

    location / {
        proxy_pass https://123.45.67.89:8182;
        proxy_set_header Host $http_host;
        proxy_set_header X_FORWARDED_PROTO https;
    }
}

导致错误:

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

我想在不指定任何证书的情况下使其工作。我该如何解决?

0 个答案:

没有答案
相关问题