Moving Tomcat Root

When I start tomcat, it starts serving from localhost: 8080 /. I would like it to start serving the local host: 8080 / aaa. I don't want to replace the “root” webapp with “aaa” webapp, I want tomcat to treat “/ aaa” as “/” in the sense that before, when I could do something like

  • localhost: 8080 / -> root webapp
  • localhost: 8080 / webapp1 -> webapp1
  • and etc.

Now I want to do something like:

  • localhost: 8080 / aaa ---> root webapp
  • localhost: 8080 / aaa / webapp1 -> webapp1
  • and etc.

Any help would be great.

+3
source share
2 answers

, Tomcat, Apache mod_proxy.

0

, Tomcat docs (.. server.xml). , .

Tomcat server.xml.

<Context> <Host>, , path "/aaa"

http://localhost: 8080/aaa webapp "root"

<Context docBase="rootwebapp" path="/aaa" reloadable="true"  />

Context "/aaa/webapp1", , webapp1 http://localhost: 8080/aaa/webapp1

<Context docBase="webapp1" path="/aaa/webapp1" reloadable="true"  />
0

Source: https://habr.com/ru/post/1767079/


All Articles