Debian Server not responding via IP addess or Hostname

0

I have a Virtual Private Server with Debian installed, on the server I run the JBoss application server to host my web application. Jboss uses port :8080 so I am using rinetd to forward http traffic from port 80 to 8080

My website domain (DNS hosting company) have two A-records, one for www.mydomain.com and one for mydomain.com, both point to the server IP address

Now, my website is working fine for www.mydomain.com, but if you enter mydomain.com, the server hostname, or the server IP address into a browser you get a 404 not found

I have contacted my DNS hosting company and they say the DNS mappings are correct and it must be a server issue, which implies that debian is somehow treating the requests differently

Is this possible? And If so what could be causing it?

(btw. I can SSH using the hostname/IP, it just seems to be HTTP requests)

Here is the log output from rinetd

Webpage requested using www.mydomain.com

Date and time           Client address     Listening host      Listening port     Forwarded-to host     Forwarded-to port     Bytes received from client      Bytes sent to client     Result message               
16/Jan/2013:11:04:15    92.23.40.45        77.**.6.32          80                 77.**.6.32            8080                  4923                            6196                     done-local-closed

Webpage requested using IP, hostname or naked domain (without www)

16/Jan/2013:11:08:21    92.23.40.45        77.**.6.32          80                77.**.6.32         8080    0   0   done-remote-closed

DaveB

Posted 2013-01-27T22:41:56.017

Reputation: 103

Answers

1

Are you sure you're getting a 404 error?

If you are, your PC is connecting to your server without any problems, but there is a problem with your jBoss setup (I would guess that it's not set up to respond to requests on the main domain, just the www 'subdomain'.)

Did you hire somebody to write the jBoss for you? If so, it's probably best to speak to them about the problem.

CyberJacob

Posted 2013-01-27T22:41:56.017

Reputation: 458

Yes you are completely right, I was missing an <Alias>mydomain.com</Alias> tag in the server.xml configuration in JBoss...thanks for the pointer – DaveB – 2013-02-25T14:28:27.843