Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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 Feb 25 '13 at 14:28

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.