LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-13-2011, 03:51 PM   #1
Droa
Member
 
Registered: Oct 2011
Location: ~
Distribution: Debian 7
Posts: 60

Rep: Reputation: Disabled
Tomcat6 stops listening when i change from port 8080


Hey everybody.

So i wanted to start out as an previous experinced java developer, to try out tomcat6, on my Test Server Machine, so i totally reinstalled my Debian6 on it, and only installed

sshd
tomcat6
tomcat6-admin
tomcat6-common
tomcat6-docs
tomcat6-user

now tomcat6 works perfectly on port 8080, but i wanted to run it as main httpd service, when i later learn to contrcut some nice looking stuff. i have been working alot on how it all works, as it is very diffrent from my latest uses (PHP).

now the most important thing to know, is ofcasue to setup and configure the server (ofcasue) :P

but i kinda gave up after 5 hours of trying myself.

how in (some religious god)'s name do you change the listening port from 8080 to 80?

i tryed to change /etc/tomcat6/server.xml

from
Code:
<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               URIEncoding="UTF-8"
               redirectPort="8443" />
to

Code:
<Connector port="80" protocol="HTTP/1.1"
               connectionTimeout="20000"
               URIEncoding="UTF-8"
               redirectPort="8443" />
it seems to totally stop listening when i do that, my netstat dont evven list it as a listener?
hmm do i need to do something else?
 
Old 10-13-2011, 04:30 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
what user is this running as? can you run it on other ports above 1024? you need root privledges to listen on ports under 1024. It's pretty common to run apache on 80 and then use mod_proxy of mod_jk to connect the the tomcat server.
 
Old 10-13-2011, 05:08 PM   #3
Droa
Member
 
Registered: Oct 2011
Location: ~
Distribution: Debian 7
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
what user is this running as? can you run it on other ports above 1024? you need root privledges to listen on ports under 1024. It's pretty common to run apache on 80 and then use mod_proxy of mod_jk to connect the the tomcat server.
Thats proberly the problem right there. i install apache2 too then :P

how can it bee that Apache2 uses the www:www user:group, and still is allowed the 80-port? hmmm well.. it works trough the mod_proxy from apache2.. thanks for the fast answer
 
Old 10-13-2011, 05:10 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Apache opens the ports as root then changes user after this point.
 
Old 03-14-2012, 12:03 AM   #5
Droa
Member
 
Registered: Oct 2011
Location: ~
Distribution: Debian 7
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
Apache opens the ports as root then changes user after this point.
thanks
 
Old 03-14-2012, 12:04 AM   #6
Droa
Member
 
Registered: Oct 2011
Location: ~
Distribution: Debian 7
Posts: 60

Original Poster
Rep: Reputation: Disabled
thanks for the replies, i've been working a little more with tomcat, and gotten a little more use to it.
it seems pretty advance, but in a simple way
 
Old 07-26-2012, 02:18 AM   #7
trongthect
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Rep: Reputation: Disabled
i have same problem. my server is running Centos 5.7. i have installed tomcat6, tomcat6-webapps, tomcat6-admin-webapps.

first, i change http port from 80 to 8081 at file: /etc/httpd/conf/httpd.conf --> it runs with that port ok
second, change port in /etc/tomcat6/server.xml from 8080 to 80.


<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
to
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />

after restarting tomcat6, it still runs on 8080 port instead of 80.

please help me. Thank you.
 
Old 07-26-2012, 03:56 PM   #8
Droa
Member
 
Registered: Oct 2011
Location: ~
Distribution: Debian 7
Posts: 60

Original Poster
Rep: Reputation: Disabled
i have not been able to make it run 80.. but you can use the Proxy from Apache HTTPD, to route your port 80 to 8080.
 
  


Reply

Tags
httpd, port, tomcat6


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My Apache is not listening on port 8080 wachira Linux - Server 2 12-02-2010 02:09 PM
SFTP server port blocked on Uni network, need to change the listening port. sammyboy161 Linux - Newbie 2 10-21-2010 12:03 PM
change IMAP port from 143 to 8080 irishbitte Linux - Desktop 5 11-25-2009 04:36 PM
How do you change port 8080 to port 80? bt101 Linux - Networking 10 03-18-2009 03:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration