0

docker-compose 通过 docker 部署 Harbor: 在此处输入镜像描述

Nginx 配置:

upstream harbor {
    server 192.168.xxx.xxx:8081;
}
 
server{
    listen 80;
    server_name localhost;
 
    location /harbor/ {
 
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host:$server_port;
 
        proxy_pass  http://harbor;
        index index.html index.htm;
 
    }
}

访问浏览器 URL 失败:

在此处输入图像描述

4

0 回答 0