Results 1 to 6 of 6
  1. #1

    * [Help] How to change Tomcat default port (8080)?

    My app needs to be viewed using :8080 behind the domain. I want it be viewable without using adding any port behind. I've research on google and many said about edit the server.xml file but the problem is I can't located the file no mater what Can anyone kind enough to help? Thanks


    [email protected] [~]# find -name server.xml
    [email protected] [~]#
    Last edited by kohkindachi; 11-01-2009 at 01:58 AM.

  2. #2
    Join Date
    Oct 2009
    Location
    New York
    Posts
    46
    Hi,

    What Tomcat version are you using? When it was installed was the TOMCAT_HOME environment variable configured? This usually points the Tomcat home directory. The server.xml file resides in the $TOMCAT_HOME/conf directory.

  3. #3
    I found it in /usr/local/sakura

    I changed

    <Connector port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />

    to

    <Connector port="80" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />

    I rebooted my VPS, now it's not working at all. Will have to chnage back to 8080 :/ http://forums.digitalpoint.com/images/misc/progress.gif
    If someone can do it on my behalf pm me your MSN. Will pay

  4. #4
    Join Date
    Oct 2009
    Location
    New York
    Posts
    46
    Running Tomcat on port 80 requires other considerations and should be carefully thought out. Do you have a web server (Apache) already installed? If yes, then it is already using port 80. If this is the case then one solution is to used mod_jk2 or mod_proxy and front-end the Tomcat server with Apache.

    As a side note: ports below 1024 are privileged and only root may bind to these ports. Running Tomcat as root is discouraged since it has security implications.
    Last edited by stahightech; 11-01-2009 at 03:57 AM.

  5. #5
    Join Date
    Oct 2009
    Location
    New York
    Posts
    46
    Sorry, typo it should be mod_jk and not mod_jk2.

  6. #6
    Join Date
    Oct 2003
    Location
    The Netherlands
    Posts
    1,246
    Or you can use mod_proxy, which is easier on the configuration and less likely to break down.
    You can also use IPTables NAT if you don't want to run a separate server, but I don't really recommend it.

    There are also a few deamons you can run.


    Have a look here: http://www.klawitter.de/tomcat80.html

Similar Threads

  1. Change Default path in Tomcat ?
    By map007 in forum Hosting Security and Technology
    Replies: 1
    Last Post: 12-02-2008, 04:07 AM
  2. Redirect 8080 requests to 80 port - Tomcat problem at cPanel server
    By sh4ka in forum Hosting Security and Technology
    Replies: 5
    Last Post: 02-01-2008, 03:41 PM
  3. Help! How to change port default of MySQL And SSL
    By HoangJav@ in forum Hosting Security and Technology
    Replies: 2
    Last Post: 01-26-2006, 05:15 PM
  4. java web app port 8080 problems on tomcat
    By pelon in forum Web Hosting
    Replies: 4
    Last Post: 06-21-2005, 07:42 AM
  5. How do i do change port 2082 to 80 or 8080 ?
    By tencongty in forum Hosting Security and Technology
    Replies: 9
    Last Post: 07-19-2004, 06:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •