Re: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-10 Thread Oded Arbel
On Tuesday, 10 בJanuary 2006 02:35, Caldarale, Charles R wrote:
  From: Sriram Narayanan [mailto:[EMAIL PROTECTED]
  Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost
 
  The link he gave talks about how to have PHP etc along side Tomcat.

 PHP can be fairly easily used with Tomcat standalone:
 http://wiki.apache.org/tomcat/UsingPhp

 So, I repeat:  What full-fledged features do you think are missing
 from Tomcat?

The most important reason that I use an Apache frontend for tomcat, 
which is probably not relevant to the original poster, is that under 
Unix only root processes can open port 80 (the default HTTP port), and 
so if tomcat is configured to serve pages on port 80, it must run as 
root. 
This is a serious security concern. Apache knows how to open port 80 and 
then change to a non-privileged user, something which AFAIK tomcat - 
being based on Java which does not support the concept of operating 
system privileges - cannot do.

There for, some kind of frontend is required. While we are in the 
process of providing a frontend, it might as well be Apache which 
offers additional features: reverse-proxying and caching and support 
for a huge number of scripting languages (python, perl or ruby 
anyone ?) and other modules. 

Also - the tomcat support for PHP is really nice and I am planning on 
trying it out ASAP, but I prefer not to do hacks on production 
machines, and Apache support for PHP is better integrated and is 
offered as part of my base operating system - including support for 
compiled pages, code caches and PHP debugging.

-- 
Oded

::..
Ability is nothing without opportunity.
-- Napoleon Bonaparte

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-10 Thread Warren Pace

 
 From: Oded Arbel [EMAIL PROTECTED]
 Date: 2006/01/10 Tue AM 06:59:08 EST
 To: users@tomcat.apache.org
 CC: Caldarale, Charles R [EMAIL PROTECTED]
 Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost
 
 On Tuesday, 10 ?January 2006 02:35, Caldarale, Charles R wrote:
   From: Sriram Narayanan [mailto:[EMAIL PROTECTED]
   Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost
  
   The link he gave talks about how to have PHP etc along side Tomcat.
 
  PHP can be fairly easily used with Tomcat standalone:
  http://wiki.apache.org/tomcat/UsingPhp
 
  So, I repeat:  What full-fledged features do you think are missing
  from Tomcat?
 
 The most important reason that I use an Apache frontend for tomcat, 
 which is probably not relevant to the original poster, is that under 
 Unix only root processes can open port 80 (the default HTTP port), and 
 so if tomcat is configured to serve pages on port 80, it must run as 
 root. 
 This is a serious security concern. Apache knows how to open port 80 and 
 then change to a non-privileged user, something which AFAIK tomcat - 
 being based on Java which does not support the concept of operating 
 system privileges - cannot do.
 

You can use jsvc to run tomcat as a non-priviledged user on port 80.

 There for, some kind of frontend is required. While we are in the 
 process of providing a frontend, it might as well be Apache which 
 offers additional features: reverse-proxying and caching and support 
 for a huge number of scripting languages (python, perl or ruby 
 anyone ?) and other modules. 
 
 Also - the tomcat support for PHP is really nice and I am planning on 
 trying it out ASAP, but I prefer not to do hacks on production 
 machines, and Apache support for PHP is better integrated and is 
 offered as part of my base operating system - including support for 
 compiled pages, code caches and PHP debugging.
 
 -- 
 Oded
 
 ::..
 Ability is nothing without opportunity.
   -- Napoleon Bonaparte
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-10 Thread Oded Arbel
On Tuesday, 10 בJanuary 2006 14:31, Warren Pace wrote:
  The most important reason that I use an Apache frontend for tomcat,
  which is probably not relevant to the original poster, is that
  under Unix only root processes can open port 80 (the default HTTP
  port), and so if tomcat is configured to serve pages on port 80, it
  must run as root.

 You can use jsvc to run tomcat as a non-priviledged user on port 80.

That is very interesting - I was not aware of that capability of jsvc. 
Currently neither of my production operating systems (Mandriva and 
RedHat) offer this as a package, but I'll check it out.

-- 
Oded

::..
For every minute you are angry, you lose sixty seconds of happiness.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-10 Thread Warren Pace

 
 From: Oded Arbel [EMAIL PROTECTED]
 Date: 2006/01/10 Tue PM 12:46:14 EST
 To: users@tomcat.apache.org
 CC: Warren Pace [EMAIL PROTECTED]
 Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost
 
 On Tuesday, 10 ?January 2006 14:31, Warren Pace wrote:
   The most important reason that I use an Apache frontend for tomcat,
   which is probably not relevant to the original poster, is that
   under Unix only root processes can open port 80 (the default HTTP
   port), and so if tomcat is configured to serve pages on port 80, it
   must run as root.
 
  You can use jsvc to run tomcat as a non-priviledged user on port 80.
 
 That is very interesting - I was not aware of that capability of jsvc. 
 Currently neither of my production operating systems (Mandriva and 
 RedHat) offer this as a package, but I'll check it out.
 
I'm running it on OpenSuSE and have previously run it on Debian and Fedora Core 
4.  None of these distributions offer jsvc as a package either.  The source 
code for jsvc is included with the tomcat binaries in the bin directory.  You 
have to gunzip the file jsvc.tar.gz which will create the subdirectries 
containing the source you'll need to compile.  You'll then need to compile jsvc 
and write your own init.d script.  You'll also need to edit server.xml and 
change the connector port from 8080 to 80.  I'll send you a copy of my init 
script you can used as a template if you'd like but basically it's just 
/etc/skeleton altered to launc jsvc.

 -- 
 Oded
 
 ::..
 For every minute you are angry, you lose sixty seconds of happiness.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-10 Thread Parsons Technical Services
Don't forget the alternate trick of port(s) redirection. For some it is 
simpler. I use jsvc on TAO Linux, a RedHat clone.


Doug

- Original Message - 
From: Warren Pace [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, January 10, 2006 9:50 PM
Subject: Re: Re: Apache + Tomcat, Tomcat only handles JSP in localhost






From: Oded Arbel [EMAIL PROTECTED]
Date: 2006/01/10 Tue PM 12:46:14 EST
To: users@tomcat.apache.org
CC: Warren Pace [EMAIL PROTECTED]
Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost

On Tuesday, 10 ?January 2006 14:31, Warren Pace wrote:
  The most important reason that I use an Apache frontend for tomcat,
  which is probably not relevant to the original poster, is that
  under Unix only root processes can open port 80 (the default HTTP
  port), and so if tomcat is configured to serve pages on port 80, it
  must run as root.

 You can use jsvc to run tomcat as a non-priviledged user on port 80.

That is very interesting - I was not aware of that capability of jsvc.
Currently neither of my production operating systems (Mandriva and
RedHat) offer this as a package, but I'll check it out.

I'm running it on OpenSuSE and have previously run it on Debian and Fedora 
Core 4.  None of these distributions offer jsvc as a package either.  The 
source code for jsvc is included with the tomcat binaries in the bin 
directory.  You have to gunzip the file jsvc.tar.gz which will create the 
subdirectries containing the source you'll need to compile.  You'll then 
need to compile jsvc and write your own init.d script.  You'll also need 
to edit server.xml and change the connector port from 8080 to 80.  I'll 
send you a copy of my init script you can used as a template if you'd like 
but basically it's just /etc/skeleton altered to launc jsvc.



--
Oded

::..
For every minute you are angry, you lose sixty seconds of happiness.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-09 Thread Nelson Maisonet

Ok, first email in this listserv so please forgive me if I forget anything.

Problem: Everything works perfectly when accessing through localhost. 
However, when I try to go through the net (domain name), instead of 
displaying the website created in .jsp it simply displays the code.


Background: I ran the tomcat server by itself for quite some time without 
any problems, but now I need the functionality of a full-fledged http server 
so I'm adding apache and connecting them together with mod_jk. Only things 
changed in the tomcat setup is what the guide asked to be added.

Guide used: http://mpcon.org/apacheguide/jsp.php

System: Windows 2003
Apache 2.0.55
Tomcat 5.5.9
mod_jk 1.2.15

If the files themselves are needed (although they are pretty much whats on 
the guide) let me know. Please help.


Thanks!

_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-09 Thread Oded Arbel
On Monday, 9 בJanuary 2006 20:28, Nelson Maisonet wrote:
 Problem: Everything works perfectly when accessing through localhost.
 However, when I try to go through the net (domain name), instead of
 displaying the website created in .jsp it simply displays the code.

 Background: I ran the tomcat server by itself for quite some time
 without any problems, but now I need the functionality of a
 full-fledged http server so I'm adding apache and connecting them
 together with mod_jk. Only things changed in the tomcat setup is what
 the guide asked to be added. Guide used:
 http://mpcon.org/apacheguide/jsp.php

you are probably accessing the JSP files through the apache server 
instead of directly through tomcat, and mod_jk isn't configured 
properly for apache and doesn't handle the JSP files. instead apache 
handles them directly.

You might want to go over the apache error log and the mod_jk log (as 
specified in the mod_jk configuration) and see if you see any 
interesting error messages.

-- 
Oded

::..
It's easy to identify people who can't count to ten. They're in front of 
you in the supermarket express lane.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-09 Thread Caldarale, Charles R
 From: Nelson Maisonet [mailto:[EMAIL PROTECTED] 
 Subject: Apache + Tomcat, Tomcat only handles JSP in localhost
 
 Background: I ran the tomcat server by itself for quite some 
 time without any problems, but now I need the functionality of
 a full-fledged http server so I'm adding apache and connecting
 them together with mod_jk.

For curiosity's sake, what full-fledged features do you think are
missing from Tomcat?

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-09 Thread Caldarale, Charles R
 From: Sriram Narayanan [mailto:[EMAIL PROTECTED] 
 Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost
 
 The link he gave talks about how to have PHP etc along side Tomcat.

PHP can be fairly easily used with Tomcat standalone:
http://wiki.apache.org/tomcat/UsingPhp

So, I repeat:  What full-fledged features do you think are missing
from Tomcat?

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-09 Thread Daniel Blumenthal
Chuck,

 So, I repeat:  What full-fledged features do you think are 
 missing from Tomcat?

The reason I'm currently using Apache+Tomcat is that I had heard that Tomcat
was significantly slower at serving static files (.css, .gif, .js, etc.).
Is this no longer the case?

Daniel



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-09 Thread Caldarale, Charles R
 From: Daniel Blumenthal [mailto:[EMAIL PROTECTED] 
 Subject: RE: Apache + Tomcat, Tomcat only handles JSP in localhost
 
 The reason I'm currently using Apache+Tomcat is that I had 
 heard that Tomcat was significantly slower at serving static
 files (.css, .gif, .js, etc.).  Is this no longer the case?

It is no longer the case.  Peter Lin did some comparisons of the Tomcat
5.0.9 and 5.5.4 levels versus Apache httpd 1.3.3 and 2.0.50:
http://tomcat.apache.org/articles/benchmark_summary.pdf

5.5.x is noticeably faster than 5.0.x, which itself is faster than 4.x;
avoiding the complexity of front-ending Tomcat would seem to be not only
prudent, but beneficial.  There are certainly situations where using
httpd in front of Tomcat does make sense (e.g., simple load balancing
for a cluster), but static content performance no longer appears to be
one of them.  Properly configuring both Tomcat and the JVM is, of
course, critical in obtaining optimum performance.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Apache + Tomcat, Tomcat only handles JSP in localhost

2006-01-09 Thread Caldarale, Charles R
 From: Thom Hehl [mailto:[EMAIL PROTECTED] 
 Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost
 
 Is there any documentation on configuring tomcat for optimum 
 performance?

Probably not all in one place.  For starters, Peter Lin has a pretty
decent summary at:
http://tomcat.apache.org/articles/performance.pdf
It's a little dated, but still very useful.

You should also take a detailed look at the Tomcat configuration
reference:
http://tomcat.apache.org/tomcat-5.5-doc/config/index.html

Also, go through all of the .xml files in the Tomcat download - lots of
useful comments in there.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]