Re: Is it possible to set the port for tomcat manager to 8080 and root port 80???

2010-03-23 Thread Jiansen Niu
While you can not define two listening ports for one Tomcat instance, you
can put a Apache web server in front of your Tomcat, and define virtual
hosts for all applications hosted by your Tomcat except Manager app.

Jiansen

2010/3/23 Søren Blidorf so...@nolas.dk

 Is it possible to set the port for tomcat manager to 8080 and root port
 80???



 Soren, DK






Re: how to uninstall apache-tomcat 5.5.16 for windows

2009-02-01 Thread Jiansen Niu
Yes, in your case, delete the apache-tomcat5.5.16 folder will uninstall
tomcat from your computer. Make sure backup files you need before your
delete the folder.

Jiansen

On Mon, Feb 2, 2009 at 12:00 AM, SrD Online srdonl...@gmail.com wrote:

 Chuck,
 I installed it fr a zip file for jsp and servelet class, so don't see it
 listed in the add/remove programs under control panel

 I tried service.bat remove and got this:

 //
 The tomcat.exe was not found...
 The CATALINA_HOME environment variable is not defined correctly.
 This environment variable is needed to run this program
 //

 Can I just delete the apache-tomcat5.5.16 directory then?
 Thanks!







 Andrew

 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Sent: Sunday, February 01, 2009 8:44 PM
 To: Tomcat Users List
 Subject: RE: how to uninstall apache-tomcat 5.5.16 for windows

  From: Andrew Pham [mailto:srdonl...@gmail.com]
  Subject: how to uninstall apache-tomcat 5.5.16 for windows
 
  If you would, please advice how to uninstall apache-tomcat
  5.5.16 for windows XP.

 If you installed Tomcat from the .exe download, it will be listed in Add or
 Remove Programs under Control Panel.

 If you installed Tomcat from the .zip download, run service.bat remove
 from Tomcat's bin directory (if you actually installed the service), then
 just delete the directory you expanded the .zip into.  There is no
 uninstall
 script for the .zip download.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




apache + mod_jk + two tomcat instance configuration

2008-05-31 Thread Jiansen Niu
I have apache2.0 as front end web server, using mod_jk and tomcat 6.0.16
serve Java web applications.
Now, I have couple PHP web applications and one Java Web application. The
Java web application can
be accessed by url www.domain1.com, workers.properties has something like
this:

workers.tomcat_home= /usr/local/apache-tomcat-6.0.16
workers.java_home=/usr/lib/jdk1.6.0_04
ps=/
#List workers
worker.list=worker001
#Define worker001
worker.worker001.port=8009
worker.worker001.host=localhost
worker.worker001.type=ajp13
worker.worker001.lbfactor=1

I want to install  codebeamer (a java webapplication) to my server,
codebeamer use a different version
of tomcat as the one I'm using. I have to use its own tomcat since they
customized it. I changed its
port to 8081, shutdown port to 8006 which are different from my current
tomcat server (8080 and 8005).

My questions is, is it possible, I add another worker in the same
workers.properties file, use different
port number say 8010 and integrates my current Apache web server with
codebeamer's tomcat, so I
can access it by www.domain1.com/codebeamer? If possible what I should do
with this line in
 workers.properties:

workers.tomcat_home= /usr/local/apache-tomcat-6.0.16

Thanks for any suggestions in advance.

Jiansen


Re: apache + mod_jk + two tomcat instance configuration

2008-05-31 Thread Jiansen Niu
Hi John,

Thanks for the comments. I did what you told me, but it does not work. here
is what I did:

workers.properties:

workers.java_home=/usr/lib/jdk1.6.0_04
#List workers
worker.list=worker001,worker002
#Define worker001
worker.worker001.port=8009
worker.worker001.host=localhost
worker.worker001.type=ajp13
worker.worker001.lbfactor=1

#Define worker002
worker.worder002.port=8010
worder.worker002.host=localhost
worker.worker002.type=ajp13
worker.worker002.lbfactor=1

httpd.conf:

LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile /etc/httpd/conf/workers.properties
# Where to put jk logs
JkLogFile /etc/httpd/logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel warn
# Select the log format
JkLogStampFormat [%a %b %d %H:%M:%S %Y]

virtual hosts:
# for www.domain1.com -- by tomcat6.0.16
VirtualHost *:80
   ServerAdmin [EMAIL PROTECTED]
   DocumentRoot /usr/servers/apache-tomcat-6.0.16/webapps/www.domain1.com
   ServerName www.domain1.com
   ErrorLog logs/domain1_error_log
   JkMount /*.jsp worker001
   JkMount /*.do worker001
/VirtualHost
# for cb.domain1.com  -- by codebeamer's built in tomcat
VirtualHost *:80
   ServerAdmin [EMAIL PROTECTED]
   DocumentRoot /home/codebeamer/cb4/tomcat/webapps/cb
   ServerName cb.domain1.com
   ErrorLog logs/cb_error_log
   JkMount /*.* worker002
   JkMount /cb/*.* worker002
/VirtualHost

I have changed AJP1.3 connector's port from 8009 to 8010 in codebeamer's
tomcat server.xml (worker002)

Now, all my PHP applications works correctly from internet by enter their
corresponding URL.
The Java application can be accessed too by www.domain1.com

but cb.domain1.com goes to the Java application under
www.domain1.cominstead of codebeamer, I checked access logs,
cb.domain1.com still forward request to tomcat6.0.16 by worker001.
cb.domain1.com is a subdomain of www.domain1.com.

Any idea why is this?

Thanks again.

Jiansen



On Sat, May 31, 2008 at 7:33 AM, Johnny Kewl [EMAIL PROTECTED] wrote:


 - Original Message - From: Jiansen Niu [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Saturday, May 31, 2008 8:35 AM
 Subject: apache + mod_jk + two tomcat instance configuration



  I have apache2.0 as front end web server, using mod_jk and tomcat 6.0.16
 serve Java web applications.
 Now, I have couple PHP web applications and one Java Web application. The
 Java web application can
 be accessed by url www.domain1.com, workers.properties has something like
 this:

 workers.tomcat_home= /usr/local/apache-tomcat-6.0.16
 workers.java_home=/usr/lib/jdk1.6.0_04
 ps=/
 #List workers
 worker.list=worker001
 #Define worker001
 worker.worker001.port=8009
 worker.worker001.host=localhost
 worker.worker001.type=ajp13
 worker.worker001.lbfactor=1

 I want to install  codebeamer (a java webapplication) to my server,
 codebeamer use a different version
 of tomcat as the one I'm using. I have to use its own tomcat since they
 customized it. I changed its
 port to 8081, shutdown port to 8006 which are different from my current
 tomcat server (8080 and 8005).

 My questions is, is it possible, I add another worker in the same
 workers.properties file, use different
 port number say 8010 and integrates my current Apache web server with
 codebeamer's tomcat, so I
 can access it by www.domain1.com/codebeamer? If possible what I should do
 with this line in
 workers.properties:

 workers.tomcat_home= /usr/local/apache-tomcat-6.0.16



 Jiansen, Yes I think so
 Something like this

 worker.list=worker1,worker2
 # Set WORKER1
 worker.worker1.port=8009
 worker.worker1.host=machine1domain
 worker.worker1.type=ajp13
 # Set WORKER2
 worker.worker2.port=9009
 worker.worker2.host=machine2domain
 worker.worker2.type=ajp13

 The host can just be machine domain names, doesnt have to be the full dns
 domain name

 Then in the jk file

 IfModule !mod_jk.c
  LoadModule jk_module /path to/Apache2.2/modules/mod_jk.so
 /IfModule

 # the path to files
 JkWorkersFile conf/jk/workers.properties
 JkLogFile conf/jk/mod_jk.log

 JkLogLevel info

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

 # Then heres the link up between workers and servlets/jsps

   JkMount /thewebapp/theservletorjsp  worker1
   JkMount /thewebapp_othermachine/theservletorjsp  worker2

 Connectors and Apache config you have done already

 If you add this to workers in the same way

 # Set STATUS MONITORING
 worker.jkstatus.type=status

 and this to jk

 JkMount /jkstatus jkstatus

 then you will also see the JK servlet, which help you do stuff, like stop
 and start workers.

 Something like the above... have fun



 ---
 HARBOR : http://www.kewlstuff.co.za/index.htm
 The most powerful application server on earth.
 The only real POJO Application Server.
 See it in Action : http://www.kewlstuff.co.za/cd_tut_swf

Re: Tomcat6, Apache, and mod_jk configuration

2008-02-19 Thread Jiansen Niu
Since you defined worker1 in you worker.properties, you should use
worker1 in the JkMount section of your httpd.conf instead of using
localhost

below is an example of my configuration which works:

LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /etc/httpd/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y]
JkMount /*.jsp wrkr
JkMount /servlet/* wrkr

in workers.properties

# workers.properties - ajp13
#
# List workers
worker.list=wrkr
#
# Define wrkr
worker.wrkr.port=8009
worker.wrkr.host=localhost
worker.wrkr.type=ajp13
worker.wrkr.cachesize=10
worker.wrkr.cache_timeout=600
worker.wrkr.socket_timeout=300

Jiansen

On Feb 19, 2008 8:43 AM, Da Rock [EMAIL PROTECTED] wrote:

 Is it the Apache? Or is it the Tomcat? All the logs say ok... so

 As I mentioned this is a FreeBSD server- 6.2, Apache2.2, Tomcat 6.0,
 mod_jk? (latest from FreeBSD ports 1.2.26?).

 My httpd.conf includes a mod_jk.conf file and the mod_jk.conf calls a
 workers.properties file. So do I need to put a reference in
 virtualhosts, or can I use it globally?

 mod_jk.conf:
 IfModule mod_jk.c
JkWorkersFile /usr/local/etc/apache22/extra/workers.properties
JkLogFile  /var/log/jk.log
JkShmFile  /var/log/jk-runtime-status
JkLogLevel error

# Sample JkMounts.  Replace these with the paths you would
# like to mount from your JSP server.
JkMount /*.jsp localhost
JkMount /servlet/* localhost
JkMount /examples/* localhost
JkMount /login/j_security_check localhost
 /IfModule
 # Map encoded urls
 Location *;jsessionid=
SetHandler jakarta-servlet
 /Location
 # Map subdirectory
 Location /webapps/
SetHandler jakarta-servlet
 /Location


 workers.properties:
 worker.worker1.port=8009
 worker.worker1.host=127.0.0.1
 worker.worker1.type=ajp13
 worker.worker1.lbfactor=1


 In the mod_jk.conf file I changed the JkMount entries to occur outside
 the IfModule directive, and ran apachectl -k graceful but still no
 change. I then navigated to /servlets (in httpd.conf there is a
 Directory directive for /webapps only, referencing the tomcat web
 directory) and a 404 error from Apache saying /servlets not found.


 On Tue, 2008-02-19 at 05:01 -0600, David Brown wrote:
  Yep, something is not right with the Apache config. You need to monitor
 some logs somewhere. Turn on more logging level before you start i.e.
 level=Debug or some such value. HTH.
 
  Da Rock wrote ..
   I'm trying to get all of the above working together peacefully with no
   success whatsoever. I've got Tomcat working, and Apache has always
   worked as per usual, but mod_jk will simply not work.
  
   I'm running all this on freebsd server, and when I navigate to
 /webapps
   on the server I get a 404 error- but from the Tomcat server! Yet
   navigating directly on the Tomcat server works fine. Am I missing
   something?
  
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: tomcat5.1 out of memory for swap space not released!

2007-09-25 Thread Jiansen Niu
I have been using Tomcat 6.0 since it was released and I would say that it
is much better
that Tomcat 5.x.  As addressed in its release document, besides support
Servlet 2.5 and
JSP2.1, Tomcat 6.0 made following improvements upon Tomcat 5.5:

   - Memory usage optimizations
   - Advanced IO capabilities
   - Refactored clustering

Not sure whether you turned on Security Manager for you Tomcat 5.0, as I
know there is
a memory leak related defect for Tomcat 5.0 when Security Manager is turned
on and has
been fixed since Tomcat 5.5.3 (Tomcat 6.0 has it fixed too). There are other
memory leaks
related defects that have been fixed since Tomcat 5.0, please refer to bug
report for more
details.

Make sure you have a up to date JDK when you using Tomcat 6.0 since there
are some
NIO send file related bugs in this release for Linux based systems, or you
can disable
send file behavior in the Connector if you JDK is not up to date.


Jiansen Niu






On 9/25/07, JacquiYan [EMAIL PROTECTED] wrote:


 Dear Mark:
 How about Tomcat 6.0?The lastest version is 6.0.Had the memory leaks been
 fixed in Tomcat6.0?And further more,is tomcat6.0 a standy version?



 Mark Thomas-15 wrote:
 
  Tomcat 5.0.x has some memory leaks but as far as I recall they were
  mostly related to context reload.
 
  If you are reloading your app, I'd suggst an upgrade to the latest
  5.5.x. If you are not reloading, then your app probably has a memory
  leak. I'd suggest using a profiler such as YourKit to try and track it
  down.
 
  Mark
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/tomcat5.1-out-of-memory-for-swap-space-not-released%21-tf4513476.html#a12873626
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to manage Apache error msgs when Tomcat is down?

2007-09-12 Thread Jiansen Niu
 In that case, why are you using httpd at all?
My guess is they think open 80 for tomcat needs too much work (they use
RHEL) but do require
users access the application via port 80 instead of 8080

Jiansen


On 9/12/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:

  From: news [mailto:[EMAIL PROTECTED] On Behalf Of Eric B.
  Subject: Re: How to manage Apache error msgs when Tomcat is down?
 
  Our tomcat apps are self-contained (non-exploded) wars, and
  mapping each individual extension beomces a challenge (ie:
  .jsp, .jspa, jsps, .jpg, .js, .), so we found it easier
  just to map the entire context.

 In that case, why are you using httpd at all?  Is it needed for some
 other reason?  If all your requests are going to Tomcat anyway, adding
 httpd to the mix just slows things down.

 - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]