关于harbor配置反向代理(nginx)

1、harbor相关配置

编辑harbor.yaml,修改external_url配置

external_url: http://10.1.117.xxx:8094

 

2、nginx相关配置

server {     listen       8094;     server_name  10.1.117.xxx;      #charset koi8-r;     client_max_body_size 500m;      access_log  log/host-harbor.access.log  main;              location / {                     #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 referer $http_referer;                     proxy_set_header X-Forwarded-Proto $scheme;                     proxy_pass   http://10.28.143.141:8094;               }       error_page   500 502 503 504  /50x.html;     location = /50x.html {         root   html;     }     }

3、推送镜像

 

 4、拉取镜像