1 防火墙必须关闭:三个服务器的防火墙必须关闭
systemctl stop firewalld
systemctl status firewalld
firewall-cmd –state
2 nginx所在的服务器的selinux必须关闭
3 tomcat的webapps下必须有maven_cloud4.war
4 开启所有的tomcat:
由ip:8080/maven_cloud4通过tomcat访问
5 安装完nginx 通过ip:80访问nginx的首页 看看welcome
6 配置/etc/nginx/conf.d/cloud.conf(注意名字不能是:cloud.config)
upstream cloud4{
server 192.168.198.131:8080;
server 192.168.198.134:8080;
server 192.168.198.135:8080;
}
server
{
listen 80;
server_name 192.168.198.131;
location /mc4{
proxy_pass http://cloud4/maven_cloud4;
proxy_cookie_path /maven_cloud4 /mc4;
}
}