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 have two domains. Domain1 uses IP1, and Domain2 uses IP2, however they both point at the same VPS.

I got it working if I go to domain1.com, however going to www.domain1.com gets stuck on the loading screen and ultimately says Oops! Google Chrome could not find www.domain1.com!. It does this in Firefox and IE as well.

While it's loading, it says Resolving Host at the bottom of my screen (in firefox, it says Looking Up www.Domain1.com).

I followed this tutorial to the letter. Basically:

1) Make a public_html directory

2) Run chmod to give 755 perms

3) Create an index file

4) Run command cp /etc/apache2/sites-available/default /etc/apache2/sites-available/domain1.com

5) Use nano to edit said file

6) Make this the file:

<VirtualHost *:80> ServerAdmin webmaster@domain1.com ServerName domain1.com ServerAlias www.domain1.com DocumentRoot /var/www/domain1.com/public_html </VirtualHost>

7) Run a2ensite domain1.com

8) Restart apache

share|improve this question
Do you have a DNS record for www that points to the correct ip address? –  joeqwerty Apr 4 '14 at 3:32
@joeqwerty Oh my god... This is what I get for staying up for two days straight. I updated the nameservers to point at through my registrar but didn't update my nameservers. Whoops. Thanks for pointing that out! –  user215116 Apr 4 '14 at 3:53
Glad to help... –  joeqwerty Apr 4 '14 at 3:56

1 Answer 1

up vote 2 down vote accepted

This sounds like an issue with your DNS entry. Make sure you have an entry for the sub-domain(www) and the it points to domain1.com.

share|improve this answer

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.