[olug] Looking for Fedora 4 Admin help
Daniel Pfile
daniel at pfile.net
Sat Apr 1 22:51:46 UTC 2006
Cesar Delgado wrote:
> To change tomcat to use port 80 you'll need to edit the server.xml file.
> There you'll find a connector that is using port 8080. Change that to
> port 80.
>
> About starting tomcat as a non-root user, just use `su`. It'll do the
> trick. Make a group "tomcat" and make a user in that group called
> "tomcat". Then run the tomcat statup script.
> su tomcat /opt/tomcat5/bin/startup.sh
Unless something changed on me, binding as port 80 as a non-root user
doesn't work unless you have some capabilities patches on your kernel
and you give tomcat permission to bind to it.
This may work good to let you bind tomcat to 8080 and forward 80 to it:
iptables -t nat -A OUTPUT -d localhost -p tcp --dport 80 -j REDIRECT
--to-ports 8080
iptables -t nat -A OUTPUT -d your hostname -p tcp --dport 80 -j REDIRECT
--to-ports 8080
iptables -t nat -A PREROUTING -d your hostname -p tcp --dport 80 -j
REDIRECT --to-ports 8080
-- Daniel
More information about the OLUG
mailing list