Yue Yuanyuan wrote:
It is running. I did iptables now it works fine. I also did test on my
ubuntu. There is no problem. I just do not get it why I run the tomcat using
ROOT, but still I do not have the privilege to bind 80 port.


Probably because you are /not/ running Tomcat as root.
You are running the script /etc/init.d/tomcatx.y as root.
But that script does not run Tomcat directly. It runs jsvc, which runs Tomcat as another user (probably "tomcat", check with "ps -ef").
Examine the script /etc/init.d/tomcatx.y, to see what it does.

It is a good way to run Tomcat, so don't change it.


By the way, that script is not a part of the "official" Tomcat distribution from http://tomcat.apache.org. It is a script created by the people who packaged Tomcat for CentOS. So not many people here know what it really does.



2010/6/30 Pid <p...@pidster.com>

On 30/06/2010 21:51, Yue Yuanyuan wrote:
is it a good idea to use vhost like this :
http://www.javathinking.com/2007/10/tomcat-with-apache2-virtual-hosts/
Thank you.
Best,
Gavin
That's an article from 2007.  Things have moved on since then.

Unless you really need HTTPD for some reason - you'll know if you do -
Tomcat is perfectly adequate and serves static files just as fast as HTTPD.

Instead of trying lots of different ways of installing Tomcat when you
run into a problem, let's try and resolve the particular issue you're
having.


If you've run Tomcat as root, and then run it as user 'tomcat' using
jsvc, you must remember to check all of the ownership permissions have
been changed on the tomcat installation to the 'tomcat' user.

Was the server actually running?

Did you check to see if Tomcat was actually listening on the port?


p


2010/6/30 Paweł Zuzelski <z...@xatka.net>

On Wed, 30 Jun 2010, Yue Yuanyuan wrote:

I think i figure out what is going on. I need to run tomcat using root.
But
even I su to root and start tomcat using /etc/init.d/tomcat6 start. It
stills runs under tomcat users.
So how could I run it using root?
It is a bad idea. Just use iptables to redirect 80 to 8888.

iptables -A PREROUTING -t nat -p tcp -dport 80 -j REDIRECT --to-ports
8888
(not tested, see man iptables for details).

It is the simplest and the most reliable way to run tomcat on port 80.

--
Regards,
Paweł

---------------------------------------------------------------------
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

Reply via email to