How do you map a sub domain to a webapp on Tomcat 6 (including the root webapp)?

后端 未结 1 1379
感动是毒
感动是毒 2020-12-23 10:54

subject says it all. What I want is to map each sub domain to a webapp like:

http://root.domain.com:8080 -> http://domain.com:8080/
http://manager.domain.         


        
相关标签:
1条回答
  • 2020-12-23 11:21

    Can you try nesting each web app as the root webapp within the <Host> in server.xml by giving path="". I havent tried this myself.

    <Host name="bbstats.localhost" appBase="webapps">
        <Context path="" docBase="/bbstats/"/>
    </Host>
    
    <Host name="tomcatstuff.localhost" appBase="webapps">
        <Context path="" docBase="/tomcatstuff/"/>
    </Host>
    
    0 讨论(0)
提交回复
热议问题