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;
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;
}
}