配置Nginx转发#创建文件夹mkdir -p /opt/nginx/conf /opt/nginx/html /opt/nginx/logs#新建配置文件vim nginx/conf/nginx.conf#配置文件内写入worker_processes 1;events{ worker_connections 1024;}http{ include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; upstream node{ server 127.0.0.1:8080; server 127.0.0.1:8081; server 127.0.0.1:8082; } server{ listen 80; server_name localhost; location / { #proxy_pass http://127.0.0.1:8080; #负载均衡配置 proxy_pass http://node } }}最后启动docker负载均衡可以用docker_compose