Apache Tomcat is an open-source Java HTTP web server developed by the Apache Foundation. Apache Tomcat 9 is the latest version available for the installation of the Tomcat web server. Tomcat is one of the most widely adopted applications and web servers. You can learn more about the Apache Tomcat visit apache official site.
As a matter of course, both Web and Host Manager is open just from localhost. To enable access for Web and Host manager from remote systems, you have to add your network to the permit list in the application-specific context.xml file. Edit the following files to allow your network by adding the IP Address or range of IP Addresses to allow access.
To access Web and Host Manager we requires username and password. Only the user with the “manager-gui” and “admin-gui” role is allowed to access the Web and Host manager respectively.
# vim /opt/tomcat/conf/tomcat-users.xml
<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="PASSWORD" roles="manager-gui" />
<!-- user admin can access manager and admin section -->
<role rolename="admin-gui" />
<user username="admin" password="PASSWORD" roles="manager-gui,admin-gui" />
manager-gui: allows access to the HTML GUI and the status pages
manager-script: allows access to the text interface and the status pages
manager-jmx: allows access to the JMX proxy and the status pages
manager-status: allows access to the status pages only
The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection:
Users with the manager-gui role should not be granted either the manager-script or manager-jmx roles. If the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.
After changes in Apache Tomcat configuration restart the Tomcat service.
# systemctl restart tomcat
To connect from remote machine use the IP address or the hostname of the system with port:
To access Manager App required username and password. In our case we can use manager user and redhat password.
Here, you can deploy an application in a specified context, start, stop, reload, and un-deploy an application.
To access Host Manager required username and password. In our case we can use admin user and redhat password.