Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Tomcat work with port 8080 but not 80?

Tags:

I have started and tested Tomcat under Port 8080 (default). Now I altered the connector port to 80 and restarted Tomcat, nothing will show on my minimal Debian 6.0 installation. Now where is the trick here?

<Connector port="80" protocol="HTTP/1.1" 
           connectionTimeout="20000" 
           URIEncoding="UTF-8"
           redirectPort="8443" />
like image 707
Dominik Avatar asked May 04 '12 13:05

Dominik


People also ask

Can Tomcat run on port 80?

You can simply configure Tomcat to start on port 80 through modifying the “Connector” tag inside server.

Is port 8080 the same as 80?

Port 80 is the default port. It's what gets used when no port is specified. 8080 is Tomcat's default port so as not to interfere with any other web server that may be running. If you are going to run Tomcat as your web server, the port can be changed to 80 so that visitors do not need to specify it.

Why is Tomcat port 8080?

The default port for the Apache Tomcat service is 8080. This port is defined for HTML traffic along with the more often used port 80. On many campus networks all high ports are blocked. This means the high HTML port of 8080 is also blocked.

How do I host my Tomcat website on port 80?

The simple answer is to edit server. xml (under your Tomcat's conf/ directory) find the <Connector> entry with protocol="HTTP/1.1" and change port="8080" to port="80".


1 Answers

go to /etc/default/tomcat6 and change #AUTHBIND=no to AUTHBIND=yes

 # If you run Tomcat on port numbers that are all higher than 1023, then you
 # do not need authbind.  It is used for binding Tomcat to lower port numbers.
 # NOTE: authbind works only with IPv4.  Do not enable it when using IPv6.
 # (yes/no, default: no)
 #AUTHBIND=no
like image 131
Dominik Avatar answered Oct 08 '22 18:10

Dominik