Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This is my current server.xml file. I would like to access my application using http://www.myapp.subdomain.com without port number 8080. But in the below changes nothing is loaded when i try using this URL : http://www.myapp.subdomain.com.

<?xml version='1.0' encoding='utf-8'?>   
<Server port="8005" shutdown="SHUTDOWN">   
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />   
  <Listener className="org.apache.catalina.core.JasperListener" />   
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />   
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />   
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />   
    <Resource name="UserDatabase" auth="Container"  
              description="User database that can be updated and saved"  
              pathname="conf/tomcat-users.xml" />   
  <Service name="Catalina">   
    <Connector port="80" protocol="HTTP/1.1"    
               redirectPort="8443" />   
    <Engine name="Catalina" defaultHost="localhost">   
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"  
    <Host name="www.mydomain.subdomain.com" appBase="webapps/myapps"  
          unpackWARs="true" autoDeploy="true"  
          xmlValidation="false" xmlNamespaceAware="false">   
         <Context path="" docBase="."/>   


Could you please help on this?.

Kind Regards S.Saravanan

share|improve this question

2 Answers 2

You need to find the following part of server.xml file and change it to look like:

<Connector port="80" protocol="HTTP/1.1"
           redirectPort="8443" />

Then, you should restart your tomcat.

share|improve this answer

If you don't want to run tomcat as root, you can translate the port with iptables like:

/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
/sbin/chkconfig iptables on
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.