前言:
此刻兄弟们对“nginx修改默认端口80”大体比较着重,咱们都想要学习一些“nginx修改默认端口80”的相关内容。那么小编同时在网络上网罗了一些对于“nginx修改默认端口80””的相关内容,希望我们能喜欢,姐妹们一起来学习一下吧!Harbor默认端口号是80,在实际使用时80端口可能已被占用,所以需要修改默认端口
详细步骤:1、修改/usr/local/harbor/docker-compose.yml文件,端口80映射到8080
proxy: image: goharbor/nginx-photon:v1.7.4 container_name: nginx restart: always cap_drop: - ALL cap_add: - CHOWN - SETGID - SETUID - NET_BIND_SERVICE volumes: - ./common/config/nginx:/etc/nginx:z networks: - harbor dns_search: . ports: - 8080:80 - 443:443 - 4443:4443 depends_on: - postgresql - registry - core - portal - log logging: driver: "syslog" options: syslog-address: "tcp://127.0.0.1:1514" tag: "proxy"2、修改/usr/local/harbor/common/templates/registry/config.yml文件,修改$public_url端口号为8080
version: 0.1log: level: info fields: service: registrystorage: cache: layerinfo: redis $storage_provider_info maintenance: uploadpurging: enabled: false delete: enabled: trueredis: addr: $redis_host:$redis_port password: $redis_password db: $redis_db_index_reghttp: addr: :5000 secret: placeholder debug: addr: localhost:5001auth: token: issuer: harbor-token-issuer realm: $public_url:8080/service/token rootcertbundle: /etc/registry/root.crt service: harbor-registrynotifications: endpoints: - name: harbor disabled: false url: $core_url/service/notifications timeout: 3000ms threshold: 5 backoff: 1s3、停止harbor,重新启动并生成配置文件
执行以下命令,完成默认端口修改
docker-compose stop
./install.sh
版权声明:
本站文章均来自互联网搜集,如有侵犯您的权益,请联系我们删除,谢谢。
标签: #nginx修改默认端口80