tomcat之nginx调度

# :安装nginx 

[root@nginx ~]# yum install nginx -y

#配置

[root@nginx ~]# vim /etc/nginx/nginx.conf

    upstream tomcats {
        server node1.magedu.com:8080;
        server node2.magedu.com:8080;
    }

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  _;
        root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {
                proxy_pass http://tomcats;
        }

#:修改tomcat配置


[root@node1 ~]# vim /usr/local/tomcat/conf/server.xml
      </Host>
      <Host name="node1.magedu.com"  appBase="/data/webapps">
      </Host>

    <Engine name="Catalina" defaultHost="node1.magedu.com">

评论

h
hw_7864

⭐️ Admin快速开发: https://show.cool-admin.com/

赞 0
h
hw_7864

⭐️ 官方文档: https://cool-js.com

赞 0
h
hw_7864

⭐️ chatgpt在线体验: https://cool-js.com/ai/chat-vip/index.html?r=helloworld

赞 0