'error parsing HTTP 404 response body: invalid character '<' looking for beginning of value

I have some problem about nginx and nexus repository. I have been created new proxy repository and configured the proxy settings to connect nexus repository with ssl. Then, when i try to connetc the nexus repository with ssl i am getting error like this;

Login did not succeed, error: Error response from daemon: Get "https://mynexusrpository:9443/v2/": error parsing HTTP 404 response body: invalid character '<' looking for beginning of value:

enter image description here

Note: My nginx configuration file is running for docker hosted repository. But not running for docker-proxy repository.

My Nginx Configuration File:

server {
        listen 9443 ssl;
        server_name mynexusrpository;
        ssl_certificate /data/nginx.crt;
        ssl_certificate_key /data/nginx1.key;
        client_max_body_size 640M;
        location / {
        access_log              /var/log/nginx/docker_proxy.log;
        proxy_set_header Content-Length "";
        proxy_set_header Host $http_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-Host $server_name;
        proxy_set_header X-Forwarded-Proto "https";
        proxy_pass http://0.0.0.0:8444;
        }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source