7

nginx代理harbor不能正常显示页面

 3 years ago
source link: https://www.oschina.net/question/2902440_2323118
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

nginx代理harbor不能正常显示页面

bikehyd 发布于 昨天 17:47

由于Harbor是通过离线docker-compose部署的,所以镜像中已经携带了一个nginx的代理容器
相当于两层的nginx代理访问,但目前配置失败

外部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;

}
}

但是现在访问192.168.xxx.xxx/harbor时显示不了页面:

up-229c58e3efc0718c62ea52143610711c8a3.png


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK