Using docker quick start terminal I have started a tomcat container and it is running and i can able to open the tomcat homepage. But i can't able to open the manager app by using default username:"admin" password:"admin". How can i update the config of tomcat??
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
from the doc https://hub.docker.com/_/tomcat/: The configuration files are available in /usr/local/tomcat/conf/. By default, no user is included in the "manager-gui" role required to operate the "/manager/html" web application. If you wish to use this app, you must define such a user in tomcat-users.xml.
If you want, you can replace this folder from your host with a volume in your run (docker run [...] -v /your/conf/:/usr/local/tomcat/conf/ [...]
)
回答2:
In your catalina base directory you need to include something like:
<role rolename="manager"/>
<user username="admin" password="admin" roles="manager"/>
at file
"\CATALINA_BASE\conf\tomcat-users.xml"
For Manager Apps : GUI access
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>