一.配置nginx反向代理 1.修改配置文件 vim /etc/nginx/nginx.conf 在35行http下添加一下内容: include /data/nginx/vhosts/*.conf; include /etc/nginx/upstream.conf; 2.在/etc/nginx/目录下新建 upstream.conf文件 vim upstream.conf upstream dev.test1.com { server 127.0.0.1(换成虚拟机ip):8080 weigh