企業級倉庫harbor搭建

一、Harbor是什麼?html

Harbor是Vmvare中國團隊開發的開源registry倉庫,相比docker官方擁有更豐富的權限權利和完善的架構設計,適用大規模docker集羣部署提供倉庫服務。在企業中很受歡迎,而且仍是開源免費的,可接入LDAP進行認證權限管理。linux

Harbor主要有五大組件:nginx

  1. Proxy:Harbor的registry, UI, token等服務,經過一個前置的反向代理統一接收瀏覽器、Docker客戶端的請求,並將請求轉發給後端不一樣的服務。
  2. Registry: 負責儲存Docker鏡像,並處理docker push/pull 命令。因爲咱們要對用戶進行訪問控制,即不一樣用戶對Docker image有不一樣的讀寫權限,Registry會指向一個token服務,強制用戶的每次docker pull/push請求都要攜帶一個合法的token, Registry會經過公鑰對token 進行解密驗證。
  3. Core services: 這是Harbor的核心功能,主要提供如下三個服務:
    1. UI:提供圖形化界面,幫助用戶管理registry上的鏡像(image), 並對用戶進行受權。
    2. webhook:爲了及時獲取registry 上image狀態變化的狀況, 在Registry上配置webhook,把狀態變化傳遞給UI模塊。
    3. token 服務:負責根據用戶權限給每一個docker push/pull命令簽發token. Docker 客戶端向Regiøstry服務發起的請求,若是不包含token,會被重定向到這裏,得到token後再從新向Registry進行請求。
  4. Database:爲core services提供數據庫服務,負責儲存用戶權限、審計日誌、Docker image分組信息等數據
  5. Log collector:爲了幫助監控Harbor運行,負責收集其餘組件的log,供往後進行分析。

    架構如圖所示:git

      

二、搭建Harborgithub

一、安裝docker部分:web

1)安裝docker的yum源。redis

wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

2)安裝docker社區版,也就是docker-cesql

yum install -y docker-ce

3)配置docker支持http協議docker

在/etc/docker目錄下建立一個文件daomon.json文件,而後輸入以下內容:數據庫

[root@chaofeng harbor]#cat /etc/docker/daemon.json 
{
    "registry-mirrors": ["https://registry.docker-cn.com"],
    "insecure-registries": ["chaofeng.com"]

}

第一行是下載鏡像加速的做用。主要是第二行內容,配置使其支持http協議。

3)啓動docker,並設置開機自啓動

systemctl start docker
systemctl enable docker

二、安裝docker-compose

在這裏踩了個坑,Harbor對docker-compose作了個限制,必需要docker-compose的版本是1.6以上纔可使用。此外可能不一樣的源獲取到的docker-compose的寫法不太同樣,好比1.6.0版本,有的寫法是:docker-compose1.6.0,而有的版本是docker-compose1.16.0,那麼對於後者的寫法來講,在如今這個2019年,你見到的docker-compose版本基本大部分是1.23.0版本以上了,可是並非說1.23 < 1.6版本,你認爲這是docker-compose版本太低,其實並非這樣子。只是他們的寫法不一樣罷了。實際是:1.6.0 < 2.3.0。

1)可使用yum一鍵安裝:

yum install -y docker-compose

2)也可使用以下所示的方法來安裝:

curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

不過對於這種方式來安裝,或許你須要受權可執行權限操做

chmod +x /usr/local/bin/docker-compose

3)最後咱們驗證一下:

[root@chaofeng src]#docker-compose -v
docker-compose version 1.23.2, build 1110ad01

三、安裝Harbor部分

1)下載Harbor

下載地址:https://github.com/goharbor/harbor/releases?after=v1.5.4

找到這個:

我如今下載的這個版本都是比較老的版本了,是2018年8月份的。

2)解壓等操做

tar -xf harbor.v1.5.2.tar.gz -C /usr/local

3)更改配置文件

#vim harbor.cfg
 
將hostname更改成域名。
hostname = chaofeng.com

其餘的操做保持默認便可,若是須要修改密碼的能夠修改一下密碼。

4)(這一步不是必須作的,酌情選擇。)固然你也能夠安裝以下所示的修改的詳細一些:

# 這裏建議使用https協議,免費的ssl證書在阿里雲上很容易就申請到了,由於不用https協議docker那邊須要修改配置若是是一兩臺docker修改倒也無所謂,多的時候就很麻煩了
ui_url_protocol = https
customize_crt = off
ssl_cert = /data/harbor/ssl_cert/reg.xxxxx.com.crt
ssl_cert_key = /data/harbor/ssl_cert/reg.xxxxx.com.key
# 須要注意的是docker-compose必需要安裝,及本機上不能監聽80,443端口
## 修改全部存儲數據目錄爲/data/harbor,默認harbor所屬的組件的數據均存儲在/data目錄下,很不方便,若是本機部署有其餘服務的數據也存儲在/data目錄的話 管理會很不方便
docker-compose.yml prepare docker-compose.chartmuseum.yml
# 分別打開上述文件搜索data關鍵字,在每個/data替換爲/data/harbor

5)執行安裝,注意,必須在harbor的目錄下執行安裝install.sh腳本文件。

#bash install.sh
 
[Step 0]: checking installation environment ...
 
Note: docker version: 17.12.1
 
Note: docker-compose version: 1.18.0
 
[Step 1]: loading Harbor images ...
52ef9064d2e4: Loading layer [==================================================>]  135.9MB/135.9MB
4a6862dbadda: Loading layer [==================================================>]  23.25MB/23.25MB
58b7d0c522b2: Loading layer [==================================================>]   24.4MB/24.4MB
9cd4bb748634: Loading layer [==================================================>]  7.168kB/7.168kB
c81302a14908: Loading layer [==================================================>]  10.56MB/10.56MB
7848e9ba72a3: Loading layer [==================================================>]  24.39MB/24.39MB
Loaded image: vmware/harbor-ui:v1.5.1
f1691b5a5198: Loading layer [==================================================>]  73.15MB/73.15MB
a529013c99e4: Loading layer [==================================================>]  3.584kB/3.584kB
d9b4853cff8b: Loading layer [==================================================>]  3.072kB/3.072kB
3d305073979e: Loading layer [==================================================>]  4.096kB/4.096kB
c9e17074f54a: Loading layer [==================================================>]  3.584kB/3.584kB
956055840e30: Loading layer [==================================================>]  9.728kB/9.728kB
Loaded image: vmware/harbor-log:v1.5.1
185db06a02d0: Loading layer [==================================================>]  23.25MB/23.25MB
835213979c70: Loading layer [==================================================>]   20.9MB/20.9MB
f74eeb41c1c9: Loading layer [==================================================>]   20.9MB/20.9MB
Loaded image: vmware/harbor-jobservice:v1.5.1
9bd5c7468774: Loading layer [==================================================>]  23.25MB/23.25MB
5fa6889b9a6d: Loading layer [==================================================>]   2.56kB/2.56kB
bd3ac235b209: Loading layer [==================================================>]   2.56kB/2.56kB
cb5d493833cc: Loading layer [==================================================>]  2.048kB/2.048kB
557669a074de: Loading layer [==================================================>]   22.8MB/22.8MB
f02b4f30a9ac: Loading layer [==================================================>]   22.8MB/22.8MB
Loaded image: vmware/registry-photon:v2.6.2-v1.5.1
5d3b562db23e: Loading layer [==================================================>]  23.25MB/23.25MB
8edca1b0e3b0: Loading layer [==================================================>]  12.16MB/12.16MB
ce5f11ea46c0: Loading layer [==================================================>]   17.3MB/17.3MB
93750d7ec363: Loading layer [==================================================>]  15.87kB/15.87kB
36f81937e80d: Loading layer [==================================================>]  3.072kB/3.072kB
37e5df92b624: Loading layer [==================================================>]  29.46MB/29.46MB
Loaded image: vmware/notary-server-photon:v0.5.1-v1.5.1
0a2f8f90bd3a: Loading layer [==================================================>]  401.3MB/401.3MB
41fca4deb6bf: Loading layer [==================================================>]  9.216kB/9.216kB
f2e28262e760: Loading layer [==================================================>]  9.216kB/9.216kB
68677196e356: Loading layer [==================================================>]   7.68kB/7.68kB
2b006714574e: Loading layer [==================================================>]  1.536kB/1.536kB
Loaded image: vmware/mariadb-photon:v1.5.1
a8c4992c632e: Loading layer [==================================================>]  156.3MB/156.3MB
0f37bf842677: Loading layer [==================================================>]  10.75MB/10.75MB
9f34c0cd38bf: Loading layer [==================================================>]  2.048kB/2.048kB
91ca17ca7e16: Loading layer [==================================================>]  48.13kB/48.13kB
5a7e0da65127: Loading layer [==================================================>]   10.8MB/10.8MB
Loaded image: vmware/clair-photon:v2.0.1-v1.5.1
0e782fe069e7: Loading layer [==================================================>]  23.25MB/23.25MB
67fc1e2f7009: Loading layer [==================================================>]  15.36MB/15.36MB
8db2141aa82c: Loading layer [==================================================>]  15.36MB/15.36MB
Loaded image: vmware/harbor-adminserver:v1.5.1
3f87a34f553c: Loading layer [==================================================>]  4.772MB/4.772MB
Loaded image: vmware/nginx-photon:v1.5.1
Loaded image: vmware/photon:1.0
ad58f3ddcb1b: Loading layer [==================================================>]  10.95MB/10.95MB
9b50f12509bf: Loading layer [==================================================>]   17.3MB/17.3MB
2c21090fd212: Loading layer [==================================================>]  15.87kB/15.87kB
38bec864f23e: Loading layer [==================================================>]  3.072kB/3.072kB
6e81ea7b0fa6: Loading layer [==================================================>]  28.24MB/28.24MB
Loaded image: vmware/notary-signer-photon:v0.5.1-v1.5.1
897a26fa09cb: Loading layer [==================================================>]  95.02MB/95.02MB
16e3a10a21ba: Loading layer [==================================================>]  6.656kB/6.656kB
85ecac164331: Loading layer [==================================================>]  2.048kB/2.048kB
37a2fb188706: Loading layer [==================================================>]   7.68kB/7.68kB
Loaded image: vmware/postgresql-photon:v1.5.1
bed9f52be1d1: Loading layer [==================================================>]  11.78kB/11.78kB
d731f2986f6e: Loading layer [==================================================>]   2.56kB/2.56kB
c3fde9a69f96: Loading layer [==================================================>]  3.072kB/3.072kB
Loaded image: vmware/harbor-db:v1.5.1
7844feb13ef3: Loading layer [==================================================>]  78.68MB/78.68MB
de0fd8aae388: Loading layer [==================================================>]  3.072kB/3.072kB
3f79efb720fd: Loading layer [==================================================>]   59.9kB/59.9kB
1c02f801c2e8: Loading layer [==================================================>]  61.95kB/61.95kB
Loaded image: vmware/redis-photon:v1.5.1
454c81edbd3b: Loading layer [==================================================>]  135.2MB/135.2MB
e99db1275091: Loading layer [==================================================>]  395.4MB/395.4MB
051e4ee23882: Loading layer [==================================================>]  9.216kB/9.216kB
6cca4437b6f6: Loading layer [==================================================>]  9.216kB/9.216kB
1d48fc08c8bc: Loading layer [==================================================>]   7.68kB/7.68kB
0419724fd942: Loading layer [==================================================>]  1.536kB/1.536kB
543c0c1ee18d: Loading layer [==================================================>]  655.2MB/655.2MB
4190aa7e89b8: Loading layer [==================================================>]  103.9kB/103.9kB
Loaded image: vmware/harbor-migrator:v1.5.0
 
 
[Step 2]: preparing environment ...
Generated and saved secret to file: /data/secretkey
Generated configuration file: ./common/config/nginx/nginx.conf
Generated configuration file: ./common/config/adminserver/env
Generated configuration file: ./common/config/ui/env
Generated configuration file: ./common/config/registry/config.yml
Generated configuration file: ./common/config/db/env
Generated configuration file: ./common/config/jobservice/env
Generated configuration file: ./common/config/jobservice/config.yml
Generated configuration file: ./common/config/log/logrotate.conf
Generated configuration file: ./common/config/jobservice/config.yml
Generated configuration file: ./common/config/ui/app.conf
Generated certificate, key file: ./common/config/ui/private_key.pem, cert file: ./common/config/registry/root.crt
The configuration files are ready, please use docker-compose to start the service.
Creating harbor-log ... done
 
[Step 3]: checking existing instance of Harbor ...
 
Creating harbor-adminserver ... done
Creating harbor-ui ... done
Creating network "harbor_harbor" with the default driver
Creating nginx ... done
Creating harbor-adminserver ...
Creating registry ...
Creating harbor-db ...
Creating redis ...
Creating harbor-ui ...
Creating nginx ...
Creating harbor-jobservice ...
 
✔ ----Harbor has been installed and started successfully.----
 
Now you should be able to visit the admin portal at http://192.168.111.5.
For more details, please visit https://github.com/vmware/harbor .

至此,Harbor就算是安裝成功了。

 6)查看一下服務

[root@chaofeng data]#docker ps
CONTAINER ID        IMAGE                                  COMMAND                  CREATED             STATUS                 PORTS                                                              NAMES
61aed845023f        vmware/harbor-jobservice:v1.5.2        "/harbor/start.sh"       3 hours ago         Up 3 hours                                                                                harbor-jobservice
b3e4835a56a0        vmware/nginx-photon:v1.5.2             "nginx -g 'daemon of…"   3 hours ago         Up 3 hours (healthy)   0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp   nginx
5d6dcd64148e        vmware/harbor-ui:v1.5.2                "/harbor/start.sh"       3 hours ago         Up 3 hours (healthy)                                                                      harbor-ui
18a2c2e2350d        vmware/harbor-adminserver:v1.5.2       "/harbor/start.sh"       3 hours ago         Up 3 hours (healthy)                                                                      harbor-adminserver
6a35ec058cd7        vmware/registry-photon:v2.6.2-v1.5.2   "/entrypoint.sh serv…"   3 hours ago         Up 3 hours (healthy)   5000/tcp                                                           registry
5a87e0483fc7        vmware/harbor-db:v1.5.2                "/usr/local/bin/dock…"   3 hours ago         Up 3 hours (healthy)   3306/tcp                                                           harbor-db
034a730d3070        vmware/redis-photon:v1.5.2             "docker-entrypoint.s…"   3 hours ago         Up 3 hours             6379/tcp                                                           redis
10d87125e327        vmware/harbor-log:v1.5.2               "/bin/sh -c /usr/loc…"   3 hours ago         Up 3 hours (healthy)   127.0.0.1:1514->10514/tcp                                          harbor-log

7)在瀏覽器中訪問咱們的倉庫。登陸帳號密碼:admin/Harbor12345

8)建立一個普通帳戶

9)建立一個項目devops,而後加入上面咱們建立的普通帳戶使其爲devops項目的成員

 10)接下來是設置上傳鏡像的REPOSITORY名字,須要點擊查看以下圖片的內容:

 

 11)設置標籤名字:

12)登陸用戶chaofeng

[root@chaofeng harbor]#docker login chaofeng.com
Username: chaofeng
Password: 
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

若是這一步報錯了,往下看解決方法。

13)上傳鏡像

[root@chaofeng harbor]#docker push chaofeng.com/devops/busybox:latest
The push refers to repository [chaofeng.com/devops/busybox]
adab5d09ba79: Layer already exists 
latest: digest: sha256:4415a904b1aca178c2450fd54928ab362825e863c0ad5452fd020e92f7a6a47e size: 527

14)在harbor中查看是否上傳成功

成功了。

報錯總結:

1)在docker login那一步報錯,好比:

[root@elk-chaofeng02 harbor]#docker login chaofeng.com
Username: admin
Password: 
Error response from daemon: Get http://chaofeng.com/v2/: dial tcp: lookup chaofeng.com on 192.168.1.1:53: read udp 172.16.0.52:38799->192.168.1.1:53: i/o timeout

這是由於chaofeng.com不能正確解析IP致使的,咱們能夠在/etc/hosts文件中添加域名ip映射,例如:

2)若是是在push鏡像的時候出錯了(前提是你要確認好是真的登陸成功了,顯示"login succeed",你再看這個問題解決方法),以下所示:

這裏的docker.io是一個docker的一個官方倉庫,之因此沒有上傳到咱們本地搭建的倉庫而是自動尋找dockerhub倉庫是由於咱們的鏡像標籤沒有作好致使的,URL沒有作好,默認是提交到官方的docker倉庫中的。我上面的elk-chaofeng02是本身把看成了域名,可是docker卻不認這是域名。解決方法就是在harbor目錄在的harbor.cfg文件中,將hostname修改成帶有.com結尾的域名,多加幾個點號就行了。或者你能夠參考這個文章所說的來解決:https://blog.csdn.net/qq_39623859/article/details/79752803 。

也有多是你要上傳的那個倉庫沒有你的權限,那你照樣上傳不了。

3)若是報錯:Error response from daemon: Get https:// 172.16.1.146:5000/v1/_ping: http: server gave HTTP response to HTTPS client。

這是由於docker客戶端沒有配置免https證書致使的。是docker客戶端須要配置。

若是你安裝的是docker-ce社區版,那麼就在:

若是你直接就是yum一鍵安裝的docker,那麼你須要修改啓動程序才行,以下:

這是不一樣版本的docker的不一樣配置模式,核心是同樣的。

4)還有一個須要說明的是:一旦你修改了harbor的配置文件,那麼你要使用docker-compose命令將harbor中止了,而後執行install.sh腳本文件進行安裝。

5)此外,harbor默認的數據存放目錄是在/data目錄下,這樣子致使的結果就是/data目錄下的數據比較混亂,不易於管理。由於咱們的/data目錄多用於存放數據,最好規格一點。所以咱們最好在配置文件中修改harbor存放數據的目錄位置,我上面介紹的有,網上看看。

我也參考了三位博主的文章,而後本身親身測試並作的總結:

私有倉庫搭建過程小結:

1,安裝docker-compose
rpm -ivh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
yum install docker docker-compose -y

systemctl start docker
systemctl enable docker

2,安裝harbor
# 申請ssl證書,在阿里雲或騰訊雲上申請免費的ssl證書並上傳到服務器
# 放置/data/harbor/ssl_cert目錄下
mkdir /data/harbor/ssl_cert -pv
ls /data/harbor/ssl_cert/
reg.xxxxx.com.crt  reg.xxxxx.com.key

# 在線安裝
下載在線安裝包
https://github.com/goharbor/harbor/releases 
在上述連接中下載對應的版本,這裏使用的是1.5.2版本的,可自行下載最新版的
wget https://storage.googleapis.com/harbor-releases/harbor-online-installer-v1.5.2.tgz
tar xvf harbor-online-installer-v1.5.2.tgz
cd harbor
vim harbor.cfg
hostname = reg.xxxxx.com
# 這裏建議使用https協議,免費的ssl證書在阿里雲上很容易就申請到了,由於不用https協議docker那邊須要修改配置若是是一兩臺docker修改倒也無所謂,多的時候就很麻煩了
ui_url_protocol = https
customize_crt = off
ssl_cert = /data/harbor/ssl_cert/reg.xxxxx.com.crt
ssl_cert_key = /data/harbor/ssl_cert/reg.xxxxx.com.key
# 其餘的參數根據須要修改
# end

# 須要注意的是docker-compose必需要安裝,及本機上不能監聽80,443端口
## 修改全部存儲數據目錄爲/data/harbor,默認harbor所屬的組件的數據均存儲在/data目錄下,很不方便,若是本機部署有其餘服務的數據也存儲在/data目錄的話 管理會很不方便
docker-compose.yml prepare docker-compose.chartmuseum.yml
# 分別打開上述文件搜索data關鍵字,在每個/data替換爲/data/harbor 

# 執行安裝腳本
./install.sh
# 直到出現如下信息則表示安裝成功
✔ ----Harbor has been installed and started successfully.----

Now you should be able to visit the admin portal at https://reg.xxxxx.com. 
For more details, please visit https://github.com/vmware/harbor .



# 測試
瀏覽器打開https://reg.xxxxx.com 
默認用戶密碼爲 admin/Harbor12345

# 命令行登陸 registry
docker login reg.xxxxx.com

nginx反向代理harbor小結:

應用場景是這樣的,假設咱們的harbor所部署的主機上運行有其餘的http/https協議的服務
而想要二者都兼顧則須要用到反向代理技術,讓二者都可以運行在同一臺主機上
harbor自己的容器中有運行nginx,修改它的nginx也不太方便,索性就再裝一個nginx來作反代
先說下環境,這裏的機器上此前運行了nginx用於作http,80/https,443的yum倉庫服務,還有apache提供的http,88端口的svn服務
因此這裏若是再安裝harbor就會有端口衝突,80跟443都會衝突,由於harbor默認監聽主機的80跟443因此這裏就介紹如何讓他們共存
原環境端口監聽狀況以下:
nginx 80/443 提供的yum倉庫服務
apache/svn 88 提供的http的svn訪問接口

裝上harbor後的端口監聽狀況
nginx 80/443 提供yum倉庫服務(http/https),提供apache/svn的反代(http),提供harbor的反代(https)
apache 88     提供的http的svn訪問接口
harbor 8443     提供Registry的pull、push及頁面管理(https)
最終目的是 http 80端口對外提供yum,svn服務 https 443端口對外提供yum,跟Registry的pull、push及頁面管理

如上環境,首先須要知道的是harbor默認監聽80跟443端口 這裏須要修改下,因爲這裏我沒有使用http協議提供服務,而是使用的https
因此80端口這裏能夠將其關閉,而443端口須要修改成8443以避免跟nginx衝突

提供https服務的ssl證書建議去阿里雲申請免費的ssl證書,若是用自簽證書要修改docker的配置,我以爲申請個證書是一勞永逸的事情,你以爲呢?

這裏只簡單介紹harbor修改端口的配置
nginx反代這些自行思考

1,中止原有的nginx
2,安裝配置harbor(端口修改可直接在此步直接修改而後在執行./install.sh)
3,配置nginx反代

# 修改harbor的端口暴露配置,由於我這裏使用的https協議提供服務,80端口就不須要了,因此將其註釋,以下
# 安裝請參考harbor的安裝
cd /usr/local/harbor
docker-compose stop
vim docker-compose.yml
# 搜索到80那行將其註釋掉或修改成其餘端口,若是使用的是https協議可直接將80那行註釋掉
    ports:
      #- 80:80
      - 8443:443
      - 4443:4443

./install.sh

執行完成後netstat -tnlp 看看是否是隻監聽了8443端口,剩下的就是nginx反代了
nginx反代harbor的話 二者的ssl證書應該是同樣的
這裏貼下個人nginx server的配置僅供參考

    server {
        listen       80;
        server_name mirror.xxxxx.com yum.xxxxx.com mirror.centos.org;
        limit_rate 50M;
        charset utf8;
        location / {
            root   /data/soft_repos/;
            access_log  /var/log/nginx/mirror.log  main;
        }
        location /svn/ {
            proxy_pass http://127.0.0.1:88/svn/;
            access_log  /var/log/nginx/svn.log  main;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    server {
        listen       443;
        server_name mirror.xxxxx.com yum.xxxxx.com mirror.centos.org;
        access_log  /var/log/nginx/mirror_ssl.log main;
        limit_rate 50M;
        charset utf8;
        ssl on;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        ssl_certificate /etc/nginx/.ssl/mirror.crt;
        ssl_certificate_key /etc/nginx/.ssl/mirror.key;
        ssl_prefer_server_ciphers on;
        location / {
            root   /data/soft_repos/;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    server {
        listen       443;
        server_name reg.xxxxx.com;
        access_log  /var/log/nginx/harbor.log  main;
        ssl on;
        ssl_certificate /data/harbor/ssl_cert/1293901_reg.xxxxx.com.pem; 
        ssl_certificate_key /data/harbor/ssl_cert/1293901_reg.xxxxx.com.key;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers on;
        location / {
            proxy_pass   https://127.0.0.1:8443/;
        }
    }

https://blog.csdn.net/junzixing1985/article/details/80628839

https://blog.csdn.net/qq_30062125/article/details/80942998

http://www.eryajf.net/2314.html

相關文章
相關標籤/搜索