ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

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

2022-05-09 20:33:20  阅读:44  来源: 互联网

标签:set log header harbor nginx 8094 反向 proxy


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、拉取镜像

 

标签:set,log,header,harbor,nginx,8094,反向,proxy
来源: https://www.cnblogs.com/breeze-24/p/16250740.html

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有