Apache Tomcat

An open-source Java web server and servlet container to deploy Java applications.

Access Tomcat Web Interface

Open your browser and visit: http://<server-ip>:8080

Login to Manager & Admin

Use the admin username and password you set during installation ( stored securely at: /root/.cloudzy-creds).

Configuration

Tomcat config files are in /opt/tomcat/conf/

Change settings as needed and restart Tomcat:

systemctl restart tomcat

Logs are in /opt/tomcat/logs/

Allow or Deny Remote Access to Manager UI

By default, Tomcat restricts access to the manager and host-manager web apps.

This script auto-comments the IP restriction in:

/opt/tomcat/webapps/manager/META-INF/context.xml
/opt/tomcat/webapps/host-manager/META-INF/context.xml

Allowing other sections works the same way: edit their respective context.xml files and adjust the <Valve> rules.

To deny remote access again, uncomment the following line in the same files:

  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127.d+.d+.d+|::1|0:0:0:0:0:0:0:1" />

You can allow specific IP addresses instead by editing the <Valve> line to match your desired IPs.

Application Details