Apache subdomain redirect into Tomcat

前端 未结 2 1716
甜味超标
甜味超标 2020-12-29 17:25

I\'m pretty new to Apache HTTP, and sysadmin-ing in general, so i have this question I have a domain (www.doamin.com) with an Apache listening to port 80, also I have an Apa

2条回答
  •  渐次进展
    2020-12-29 17:34

    mod_jk is outdated. It is recomended to use mod_proxy (mod_proxy_http or mod_proxy_ajp) to connect forward requests to your apache server to the tomcat.

    1. define a virtual host in your apache config
    2. create a proxy directive that forwards your requests to tomcat

    Maybe this SO question give you some hints.

    You can define two virtual hosts (app1.domain.tld and app2.domain.tld) that have proxy definitions for their designated apps. Example for app1:

    
        ServerName app1.domain.tld
        ProxyRequests Off
        ProxyPreserveHost On
        
            Order deny,allow
            Allow from all
        
        ProxyPass / http://localhost:8080/app1
        ProxyPassReverse / http://localhost:8080/app1
     
    

提交回复
热议问题