network-service:tomcat
This is an old revision of the document!
Tomcat Config
Config port 80
When we need change the port, most of the time, it just need edit server.xml <pre> <Connector port=“8080” protocol=“HTTP/1.1” connectioTimeout=“20000” URIEncoding=“UTF-8”
redirectPort="8443" />
</pre>
But when I want to change it to 80, the tomcat can't start successfully. The tomcat doesn't support the port lower than 1024, so it need do some special work
vim /etc/default/tomcat6 AUTHBIND=yes
But this also not work on my vps, maybe the memory is not enough.
So the last solution is redirect to request on port 80 to 8080
sudo /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
Horray, then it works.
refer to:http://stackoverflow.com/questions/4756039/how-to-change-the-port-of-tomcat-from-8080-to-80
/var/www/dokuwiki/wiki/data/attic/network-service/tomcat.1396025580.txt.gz · Last modified: 2016/05/05 13:06 (external edit)