Tomcat相关的LNMT和LAMT

Posted shenxm

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Tomcat相关的LNMT和LAMT相关的知识,希望对你有一定的参考价值。

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的主要内容,如果未能解决你的问题,请参考以下文章

tomcat 之 tomcat实例配置

nginx反向代理tomcat

lamt(Linux apache mysql tomcat)

lamt(Linux apache mysql tomcat)

web应用构架LAMT及tomcat负载简析

lamt部署