I can access my web application (GeoServer) from this URL http://mydomain.com:8080/geoserver but I am not able to access it from http://www.mydomain.com:8080/geoserver .
How can I fix this?
My DNS records are :
A mydomain.com XXX.XXX.XXX.XXX
A www XXX.XXX.XXX.XXX
I also have Apache on this centos server for a php app and I can access my php app from http://mydomain.com or http://www.mydomain.com with no problems.
If Tomcat gets a request for an unknown host it uses the
defaultHost
setting of theEngine
. For example:If you have nothing special in your
server.xml
it should work and you should see at least a Tomcat error page. Checking Tomcat's error logs also could be useful. (Is suppose thatmydomain.com
andwww.mydomain.com
points to the same IP address.)I think there is a firewall which filters the http requests. It could be your client-side proxy too.
If i got it right, you have both Apache HTTP Server and Apache Tomcat running in the same machine.
In this case, you have two options. Listen on different ports (80 and 8080, for example). Or use a Apache HTTP mod to make the Apache HTTP and Tomcat bridge, so you can use the same port (most common, 80).
Per your description, your Tomcat is listening on port 8080, not on 80.
I'm not an expert to help further, but I think you would be better migrating this question to ServerFault.