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

Tomcat相关的LNMT和LAMT

时间:2018-02-24 18:02:05      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:nginx   location   ted   客户端   serve   jsp   tomcat   require   mod_jk   

Tomcat相关的LNMT和LAMT

    LNMT:Linux Nginx MySQL Tomcat 
        Client (http) --> nginx (reverse proxy)(http) --> tomcat  (http connector)
        
        location / {
            proxy_pass http://tc1.magedu.com:8080;
        }
        location ~* \.(jsp|do)$ {
            proxy_pass http://tc1.magedu.com:8080;
        }
        
    LAMT:Linux Apache(httpd) MySQL Tomcat 
        httpd的代理模块:
            proxy_module
            proxy_http_module:适配http协议客户端;
            proxy_ajp_module:适配ajp协议客户端;
            
        Client (http) --> httpd (proxy_http_module)(http) --> tomcat  (http connector)
        Client (http) --> httpd (proxy_ajp_module)(ajp) --> tomcat  (ajp connector)
        Client (http) --> httpd (mod_jk)(ajp) --> tomcat  (ajp connector)
        
        proxy_http_module代理配置示例:
            <VirtualHost *:80>
                ServerName      tc1.magedu.com
                ProxyRequests Off
                ProxyVia        On
                ProxyPreserveHost On
                <Proxy *>
                    Require all granted
                </Proxy>
                ProxyPass / http://tc1..com:8080/
                ProxyPassReverse / http://tc1.com:8080/ 
                <Location />
                    Require all granted
                </Location>
            </VirtualHost>
            
        proxy_ajp_module代理配置示例:
            <VirtualHost *:80>
                ServerName      tc1.magedu.com
                ProxyRequests Off
                ProxyVia        On
                ProxyPreserveHost On
                <Proxy *>
                    Require all granted
                </Proxy>
                    ProxyPass / ajp://tc1.com:8009/ 
                    ProxyPassReverse / ajp://tc1.com:8009/ 
                <Location />
                    Require all granted
                </Location>
            </VirtualHost>

Tomcat相关的LNMT和LAMT

标签:nginx   location   ted   客户端   serve   jsp   tomcat   require   mod_jk   

原文地址:https://www.cnblogs.com/shenxm/p/8466894.html

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