码迷,mamicode.com
首页 > 其他好文 > 详细

tomcat之nginx调度

时间:2019-09-02 16:57:30      阅读:88      评论:0      收藏:0      [点我收藏+]

标签:配置   http   load   htm   pst   lock   安装nginx   include   text   

# :安装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调度

标签:配置   http   load   htm   pst   lock   安装nginx   include   text   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!