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

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.

share|improve this question

migrated from webmasters.stackexchange.com Oct 29 '11 at 20:51

This question came from our site for pro webmasters.

    
looks like you should change the www in www.mydomain.com –  Rob Oct 14 '11 at 15:02
    
What does "not able to access" mean? –  palacsint Oct 16 '11 at 22:38
    
I get "The connection has timed out" when I try to access mydomain.com:8080/geoserver from firefox. I can see status "aborted" in firebug "net" tab. –  benjisail Oct 18 '11 at 14:18
add comment

2 Answers

If Tomcat gets a request for an unknown host it uses the defaultHost setting of the Engine. For example:

<Engine name="Catalina" defaultHost="localhost">

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 that mydomain.com and www.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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

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.