PS Toh

Greenhorn
+ Follow
since Sep 20, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by PS Toh

Ya, it works, thanks for helping.
15 years ago
Thanks for reply.

I change username and tomcat below to "admin", but I still cannot use it to access tomcat manager.

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>


May I know how to modify and set the username and password.

Thanks.
15 years ago
I download the tomcat5.5.20 zip file and unzip it. when I access localhost:8080, the first page appear, however what is the username and password for status and tomcat manager at the admin panel. The default should be admin for username and blank for password, but it cannot be used here.

Anyone know what is the default username and password?

Thanks.
15 years ago
I refer the article "Connecting Apache's Web Server to Multiple Instances of Tomcat" from web http://www.linuxjournal.com/article/8561

What I have done now is i can access
http://localhost:8080
http://localhost:8081
http://localhost:8082

However, I cannot access status, administration and manager pages at index.jsp for 8081 and 8082 port.

Does anyone know how to solve this?

Thanks.
15 years ago
Ok, here is what I had done so far.

1. installing J2sdk1.4.2_09,Tomcat 4.1,Apache 2.0.54,mod_jk 1.2.14
2. set my JAVA_HOME= C:\J2sdk1.4.2_09
set my CATALINA_HOME=d:\tomcat 4.1
3. put these in my apache2 httpd.conf:
#
# Load mod_jk
#
LoadModule jk_module modules/mod_jk.dll

#
# Configure mod_jk
#
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info

JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

4.create a workers.properties file

worker.list=worker1,worker2,worker3
# Set properties for worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
# Set properties for worker2
worker.worker2.type=ajp13
worker.worker2.host=localhost
worker.worker2.port=8109
# Set properties for worker3
worker.worker3.type=ajp13
worker.worker3.host=localhost
worker.worker3.port=8209

5. create instance1, instance2 and instance3 in tomcat4 directories.
6. all the new instances folder contains webbapps, conf, log, works,temp folder.

6. port number of server.xml in conf folder in each instances folder had been modified according to worker.properties.

7. put this in httpd.conf again:
<VirtualHost *:80>
ServerName domain1
JkMount /servlets-examples/* worker1
</VirtualHost>
<VirtualHost *:80>
ServerName domain2
JkMount /servlets-examples/* worker2
</VirtualHost>
<VirtualHost *:80>
ServerName domain3
JkMount /servlets-examples/* worker3
</VirtualHost>

8. I create service for instance1, instance2 and instance3 using tcservcfg.exe from http://web.bvu.edu/staff/david/index.jsp?section=software&subsection=tcservcfg&page=downloads

9. 3 new services had been created and can be started indepently in windows service.

So, theoritically, when I type http://domain2/index.jsp i should get some result because I already create some jsp file in webapps root in instance2 folder. However, I just got The page cannot be displayed message. This means I must have something wrong in my configuration above.

I had been finding ways to create multiple tomcat instances in windows for 3 days and now stucked here.

Can someone show me what I had done wrong, please guide me.

Thanks!
15 years ago
Thanks for all the quick replies.

Ok, let me explain in more detail on what I need.

My boss asked me to create multiple instances, said like he want 3 tomcat services running in windows service, eg: tomcat-dev, tomcat-support, and tomcat-testing. Each of this services can be start and shut down independently without affecting others service. For example, the support group want to restart their service but will not affect developer staff.

I have research a lot for the creation of multiple tomcat instances, however most of them are discussed in Linux.

I have also tried to create a new folder named tomcat-testing then create folders named conf, logs, works, webapps inside it. After that I copy server.xml from original tomcat to the new conf directory then change all the port as Ben said. However, this does not work for me, I think there should be something that I had missed out.

Then I research again which some article said need to use mod_jk in apache and need to create a workers.properties files. However, due to my lacking of Tomcat and apache knowledge, these articles can give some concepts but cannot make my things working.

Now I am stucked and don't know how to proceed. So, if somebody can guide me how to do this step by step, I will be really grateful to him.

Thanks in advance.
15 years ago
hi,

1st of all Im a tomcat and apache noob, but my current job require me to do this.

i know this question had been asked alot and I also had done research on it, just cannot find a complete guide. I also had read doc from official website which only tell the concept.

what i know now is it has something to do with mod_jk, server.xml(changing port), workers.properties and service creation.

Can someone help me on this or direct me to any detail documentation?

Thanks in advance.
[ September 20, 2006: Message edited by: Bear Bibeault ]
15 years ago