Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've setup a LAMP server with Ubuntu. It's a dedicated server hosted by

Now, I've purchased a domain name and I've created a A registar mapping to my server's IP address

If you browse to this IP address, this will reach my website (the 404 is expected). However, if you browse to the website using the dns


then you end up on a parking page of
I did a dig on the dns and it returns the correct IP address. So I'm not sure what I'm missing here...

Note: that if on my server I browse to the website using the domain name, then it works. So it must be something simple I've missed.

Edit: since it seems to come from my apache web config, here it is :

ServerName samuel-***-*.fr
ServerAlias www.samuel-**-*.fr
DocumentRoot /var/www/ePhotograph/web
DirectoryIndex app.php
<Directory "/var/www/ePhotograph/web">
 AllowOverride All
 Allow from All

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ app.php [QSA,L]

share|improve this question

closed as off-topic by karel, muru, Eric Carvalho, Luís de Sousa, Elder Geek Feb 21 at 23:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – karel, muru, Eric Carvalho, Luís de Sousa, Elder Geek
If this question can be reworded to fit the rules in the help center, please edit the question.

I get a 404. Are you sure it's not just your browser cache that fools you? – l3dx Aug 15 '13 at 12:15
Sounds like you have a local DNS cache issue - works for me. – Oli Aug 15 '13 at 12:16
@Sam your server isn't aliasing www. starting with your full domain name. Is a misconfiguration, but if you don't tell us the server you are using, we wouldn't be able to help you. – Braiam Aug 15 '13 at 12:37
Have you cleared your browser cache yet? – l3dx Aug 15 '13 at 13:06
try with a different browser (or smartphone or tablet or whatever) to verify it's not just browser DNS cache – Cubiq Aug 15 '13 at 13:13
up vote 0 down vote accepted

@Eliah, I cannot edit my original answer as it's been deleted. I'll write it here again because I believe it is the answer:

It was indeed the browser dns cache. You guys were right.

I basically walked away from computer and tried again a few hours later and it just worked. I guess if I had tried with a different browser it would have work too.

Thanks for helping !

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.