sudo yum install epel-release -y sudo yum install nginx nginx-mod-stream -y systemctl status nginx systemctl start nginx
修改配置文件
vim "/etc/nginx/nginx.conf" 在http模块下添加
stream { upstream harbor-80 { server 172.16.16.26:80; } server { listen 80; proxy_pass harbor-80; tcp_nodelay on; } upstream harbor-443 { server 172.16.16.26:443; } server { listen 443; proxy_pass harbor-80; tcp_nodelay on; } }