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