Skip to content

emka.web.id

Menu
  • Home
  • Indeks Artikel
  • Tutorial
  • Tentang Kami
Menu

How to Change Port Number on Apache Tomcat

Posted on January 09, 2014 by Syauqi Wiryahasana
The default port for tomcat is 8080 because developers are assuming you may have a apache server set up on port 80.  There are two issues with changing the port to 80. First, any ports under 1024 can only be managed by root which means that tomcat will need to run as root.  If you consider this too big of a security risk then you will either need to figure a way to run onport 80 as a unprivileged user or stay at port 8080.  The second issue is the conflict that you may have with apache.  If you are not running an apache server then it should not be an issue at all.  Just keep in mind you cannot bind two daemons to the same port at the same time. Make sure that apache2 is turned off if it is installed to avoid conflict on port 80. sudo service apache2 stop Check that there are not services listening on port 80. netstat -aunt | grep 80 Here is the basic configuration changes that need to be made in /usr/share/tomcat7/confserver.xml  to move from port 8080 to 80. <!--Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /--> <Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> Be sure to stop tomcat and then start tomcat and then test. via BeginLinux
Seedbacklink

Recent Posts

TENTANG EMKA.WEB>ID

EMKA.WEB.ID adalah blog seputar teknologi informasi, edukasi dan ke-NU-an yang hadir sejak tahun 2011. Kontak: kontak@emka.web.id.

©2024 emka.web.id Proudly powered by wpStatically