tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert Kam <>
Subject Cannot access webapp outside the server box using a public domain name
Date Wed, 18 Sep 2013 07:00:08 GMT
I have a case where accessing the webapp within the server box is fine,
but accessing the webapp from outside the server box using the domain name
is problematic, but not so using the public ip address, which is accessible.

The content of the webapp is just a single index.html, so no JSPs, no
classes are involved.

- On my web server, which is set for the public domain,
  curl works
  curl http://<public-ip-address> also works
  note : i registered the domain from the domain robot

- On external nodes (not on the web server), i tried to access
  curl fails
  But : curl http://<public-ip-address> works

- Both on the web server and external nodes,
  nslookup works, and returns the public ip address correctly

- I have even disabled ipv6 in my /etc/hosts and domain mapping
  So my current host file is very simple : localhost

- Here my output of
Using CATALINA_BASE:   /usr/share/tomcat7
Using CATALINA_HOME:   /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME:        /usr/lib/jvm/java-7-oracle
Server version: Apache Tomcat/7.0.28
Server built:   Dec 8 2012 06:51:43
Server number:
OS Name:        Linux
OS Version:     3.2.0-4-amd64
Architecture:   amd64
JVM Version:    1.7.0_25-b15
JVM Vendor:     Oracle Corporation

- Here's my server.xml
<?xml version='1.0' encoding='utf-8'?>

<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.core.JasperListener" />
className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <Service name="Catalina">
    <Connector port="80" protocol="HTTP/1.1"
               redirectPort="8443" address="<my-public-ip-address>" />

    <Engine name="Catalina" defaultHost="">
<Host name=""  appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
   prefix="localhost_access_log." suffix=".txt"
   pattern="%h %l %u %t &quot;%r&quot; %s %b" />

- Here's my ifconfig :
root@Debian-70-wheezy-64-minimal:/home/moonblade# ifconfig
eth0      Link encap:Ethernet  HWaddr d4:3d:7e:d8:ba:27
          inet addr:<public-ip-address>  Bcast:<public-ip-address>
          inet6 addr: <public-ip-address-v6>/64 Scope:Link
          inet6 addr: <another-public-ip-address-v6>/64 Scope:Global
          RX packets:290094 errors:0 dropped:0 overruns:0 frame:0
          TX packets:169056 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:241176295 (230.0 MiB)  TX bytes:27580533 (26.3 MiB)
          Interrupt:43 Base address:0x6000

lo        Link encap:Local Loopback
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:192 errors:0 dropped:0 overruns:0 frame:0
          TX packets:192 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:26625 (26.0 KiB)  TX bytes:26625 (26.0 KiB)

- no firewall, as the iptables are still empty :
root@Debian-70-wheezy-64-minimal:/home/moonblade# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

- my system
Linux Debian-70-wheezy-64-minimal 3.2.0-4-amd64 #1 SMP Debian
3.2.46-1+deb7u1 x86_64 GNU/Linux

Am i missing something in my server.xml ?

Do not pursue the past. Do not lose yourself in the future.
The past no longer is. The future has not yet come.
Looking deeply at life as it is in the very here and now,
the practitioner dwells in stability and freedom.
(Thich Nhat Hanh)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message