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.

Ok so my site works with the www. but not without. If I visit the page without the www. , I get a 404 message

Not Found

The requested URL / was not found on this server.

Apache/2.2.17 (Ubuntu) Server at mintuz.com Port 80

my apache 2 access log

::1 - - [03/Nov/2012:11:36:51 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.17 (Ubuntu) (internal dummy connection)"
X.X.X.X - - [03/Nov/2012:11:37:01 +0000] "GET / HTTP/1.1" 404 496 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
X.X.X.X - - [03/Nov/2012:11:37:01 +0000] "GET /favicon.ico HTTP/1.1" 404 502 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"

my apache 2 error log

[Sat Nov 03 21:05:06 2012] [error] [client 94.15.36.37] File does not exist: /etc/apache2/htdocs [Sat Nov 03 21:05:06 2012] [error] [client 94.15.36.37] File does not exist: /etc/apache2/htdocs

My vhost config.

<VirtualHost *:80>
        DocumentRoot /var/www/mintuz.com
        ServerName www.mintuz.com
        ServerAlias mintuz.com *.mintuz.com
</VirtualHost>

I feel as if it's not my DNS because it is hitting my server in both instances, just my server replies with a 404. Any suggestions welcome.

share|improve this question
1  
Try this, ServerName mintuz.com ServerAlias *.mintuz.com –  toxboi Nov 3 '12 at 14:27
    
You quote the access_log but not the error_log, which may have interesting tips. Also, are you sure the <VirtualHost> you quote is the only one? Another one may be elsewhere in the large Apache config files, and take precedence. –  bortzmeyer Nov 3 '12 at 16:27
    
I have included my error log –  Mintuz Nov 3 '12 at 21:05

1 Answer 1

Adding my ip address to the fixed my issue as well as uncommenting some stuff in the default vhost file.

share|improve this answer
1  
Really, "uncommenting some stuff?" How useful do you think that's going to be to anyone else? –  HopelessN00b Nov 3 '12 at 21:42

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.