首页 > 其他 > 详细

tomcat之nginx调度

时间:2019-09-02 17:13:26      阅读:39      评论:0      收藏:0      [点我收藏+]
# :安装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">

 

tomcat之nginx调度

原文:https://www.cnblogs.com/maxuebin/p/11447432.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!