Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Subdomain not working
PostPosted: Sun May 09, 2010 8:10 pm 
Offline
Senior Newbie

Joined: Sun Jan 31, 2010 12:59 am
Posts: 9
Hi, thanks for looking,

I have done a successful subdomain on my linode before. I am following the same steps, but now it does not work, in firefox, I get Problem loading page "Firefox can't find the server at stats.mydomain.com".

Here is what I've done/got:

In the LM: A/AAAA record added with the correct IP and the right subdomain name "stats" (entering "stats.mydomain.com" does the same thing)

On the server, I've done the following

$ sudo nano /etc/apache2/sites-available/stats.mydomain.com

Code:

# Place any notes or comments you have here
    # It will make any customisation easier to understand in the weeks to come

    # domain: stats.mydomain.com
    # public: /var/www/vhosts/stats.mydomain.com/

    <VirtualHost myIP:80>

      # Admin email, Server Name (domain name) and any aliases
      ServerAdmin admin@mydomain.com
      ServerName  stats.mydomain.com
      ServerAlias www.stats.mydomain.com


      # Index file and Document Root (where the public files are located)
      DocumentRoot /var/www/vhosts/stats.mydomain.com/

<Directory /var/www/vhosts/stats.mydomain.com>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

      # Custom log file locations
      LogLevel warn
      ErrorLog  /var/www/vhosts/stats.mydomain.com/log/error.log
      CustomLog /var/www/vhosts/stats.mydomain.com/log/access.log combined

    </VirtualHost>



Now I run the following

Code:
$ sudo mkdir -p /var/www/vhosts/stats.mydomain.com/log/ (this creates the parent directory)
$ sudo chown -R myUser /var/www/vhosts/stats.mydomain.com
$ sudo chgrp -R www-data /var/www/vhosts/stats.mydomain.com
$ echo "Hello World" >> /var/www/vhosts/stats.mydomain.com/index.html


Then I enable the site and reload apache
Code:
$ sudo a2ensite stats.mydomain.com
$ sudo /etc/init.d/apache2 reload


Upon loading it up in my browser, it doesn't work! Yes the parent domain works, and I've also got a working subdomain for another site on the same server, so I know it's possible.

What have I missed? Thanks for any help,

Bung


Last edited by Bung on Sun May 09, 2010 8:27 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Sun May 09, 2010 8:21 pm 
Offline
Senior Newbie

Joined: Sun Jan 31, 2010 12:59 am
Posts: 9
I've been informed that there is a delay on DNS refreshes.


Top
   
 Post subject:
PostPosted: Sat May 15, 2010 10:32 pm 
Offline
Senior Member

Joined: Wed Mar 03, 2010 2:04 pm
Posts: 111
You can define a wildcard A record in DNS Manager (put "*" in for the hostname, no quotes) so that all subdomains are automatically covered.

And if you want to test before DNS reflects the change at your ISP, you can add an entry to your HOSTS file:

stats.mydomain.com nnn.nnn.nnn.nnn

To be sure your server is handling things properly regardless of DNS status.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group