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

I'm trying to set up virtual hosts on my VPS (centos). I set both domain nameservers to fns1.dnspark.net and fns2.dnspark.net and set an A record there for each domain pointing to my IP address

I previously had the domains hosted on HostGator at a different IP address. Both domains are currently resolving to the first virtual host. Occasionally though, the repthis.info is still served from HostGator (the index page at the new server for repthis.info will say 'it works!'). What am I doing wrong?

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin dylan@psu.edu   
    DocumentRoot /var/www/root/dylanstestserver.com
    ServerName dylanstestserver.com
    ServerAlias www.dylanstestserver.com
    ErrorLog logs/dylanstestserver.com-error-log
    CustomLog logs/dylanstestserver.com-access_log common

<VirtualHost *:80>
    ServerAdmin dylan@psu.edu   
    DocumentRoot /var/www/root/repthis.info
    ServerName repthis.info
    ServerAlias www.repthis.info
    ErrorLog logs/repthis.info-error-log
    CustomLog logs/repthis.info-access_log common
share|improve this question
I get different pages from both. The 1st is your website and the second is a temporarily down as we switch hosts! message. Both resolve to –  Iain Dec 25 '10 at 16:23
that's actually the strangest part, but I thought somehow that was the fault of my cacheing so i left it unsaid. That's actually from my previous hosting at hostgator, on a different IP. The page it should be serving is a third different page from the new server at /var/www/root/repthis.info/index.php that says 'it works!'. –  nona urbiz Dec 25 '10 at 17:10
It seems to be working now - I see the it works message. The message is in index.html –  Iain Dec 25 '10 at 17:32
odd. it seems to have picked it up now. i suppose it just takes more than i thought to update/propagate. –  nona urbiz Dec 25 '10 at 17:36
If the A to your Q is useful to others, you could add an answer then accept it. If you feel your unanswered Q has no value to others, you could delete it. –  RedGrittyBrick Dec 26 '10 at 18:14

1 Answer 1

The problem was solved by waiting for changes in the DNS to be reflected across the internet.

share|improve this answer
Glad you resolved this issue. Please be sure to mark your answer as "accepted" when you are able. –  jscott Jul 17 '12 at 23:57
@jscott: I would if I could but I can't as it's not my question. I just made an answer from the comments as the OP clearly isn't going to do so. –  Iain Jul 18 '12 at 6:50
sorry! threw that comment on from review, not sure how I didn't notice it was you. :) –  jscott Jul 18 '12 at 10:54

Your Answer


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.