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:
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;
}
}
CodePudding user response:
I am confused the about configuration file, because same configuration is running docker hosted repository, when i change the kind of nexus repository with docker proxy repository this settings not running. Because image repository's certicate is self signed certficate(Let's Encrypt). Our security rules trust the "let's encrypt" but not support the self signed certficate. When we added new firewall rules for image registry and changed the nginx configuration file for reverse proxy we established connection for external registry.
New 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_pass http://mynexusrpository:8444;
}
}