Joe Ess wrote:
Naveen Akshaye wrote:Hi,
The default tomcat webapp folder is /var/lib/tomcat5.5.
I believe the default webapp folder is /var/lib/tomcat5.5/webapps, at least it is on my Ubuntu server.
As for changing CATALINA_BASE, it is defined in catalina.sh as: "Base directory for resolving dynamic portions of a Catalina installation. If not present, resolves to the same directory that CATALINA_HOME points to", so that is not what you are looking for either.
What you probably want to do is change the appBase attribute of the Host tag in server.xml. You could also configure the docBase in a web application context. This would let you control the directory on a per-application basis.
Yes, you are right. The default webapps folder is /var/lib/tomcat5.5/webapps associated to virtualhost of "localhost:8180".
I want to put all my web projects under another location. Although I can create a link of it under "/var/lib/tomcat5.5/webapps", I want to separate my data from system's apps on "localhost:8180". So I want to create a different virtual host listening to the port 9029 and with the docBase being another location like "/home/naveen/mywebproject/webapps".
Here is what I have done, but didn't work it out.
1. I installed apache connector package: libapache2-mod-jk, and configured it with worker properties. (Prerequisites of package installation are finished, apache, tomcat, apache connector)
2. I created a virtual host under /etc/apache2/sites-enabled/tomcat-host with following content:
When I go to "localhost:9029", it lists out all files under this folder. It's not what I expected.
3. I edited the file of /etc/tomcat5.5/server.xml
4. I checked the folder under /etc/tomcat5.5/Catalina, there is only one folder of "localhost". I know that's for use of default tomcat application which is under "/var/lib/tomcat5.5/webapps". There are xml files in which I can specify the docBase element. But even though I can change the "ROOT.xml" to point the root path to my project folder, the application deployed in this way is actually still on virtual host of "localhost:8180", which is not what I expected, "localhost:9029". Do I need to create another folder with different host name?
Really appreciate of any helps.
Thanks.
Naveen.