Hi all. I never had experience setting up webservers, so I have some silly questions regarding configuration and access. It seems that I have successfully installed Tomcat on my Ubuntu (11.10), although I didn't set up any environment variables, and yet when I execute ./startup.sh everything works fine. I understand that these environment variables are needed for the scripts and not Tomcat itself, so when I start it, all values in these variables are correct (except for JRE_HOME it just points to /usr, but when I try to check if Tomcat is running, it's there). So is it mandatory to set up these variables? Also, how do I access the server from another machine? I mean, it's a silly question, but when I type http://myipaddress:8080 it just won't connect. (only http://localhost:8080), do I need to configure something? Or is the connection just being blocked? If yes, how do I resolve that?
You have to set up JAVA_HOME (or JRE_HOME). Tomcat will deduce the other items based on that and on the location of the startup script (actually, the catalina.sh script). You can override when these defaults are not sufficient - for example, when you have multiple Tomcats so that CATALINA_HOME and CATALINA_BASE have different values.
For settings within Tomcat itself, you can create a setenv.sh inside TOMCAT_HOME/bin. Use this, for example, to override the default JVM memory settings.
To access Tomcat from another machine, you have to open Tomcat's port (8080) in the machine's firewall (iptables). Also open up port 8443, if you will be using SSL/TLS.
An IDE is no substitute for an Intelligent Developer.
Joined: Jun 22, 2012
Thanks for reply. I see that this is a common configuration issue, also forgot I was using my router.. :d