Create subdomain and set it up
11 Replies
On your Linode, you need to set up set up a virtual host in your web server software. This is done the same way that you set up the virtual host for your main domain – usually it is easiest make a copy of your main domain's vhost and adjust the copy for your subdomain, make sure it's going to be recognized by your web server software (usually done by making a link (shortcut) to your web server's sites-enabled directory if it has one), then restart your web server software. I can't give specific instructions since I don't know what web server software you use.
sport 178.79.145.163 Default
and my virtual host is like
ServerName sport.arabba.hr
ServerAlias
DocumentRoot /srv/www/sport/public_html/
ErrorLog /srv/www/sport/logs/error.log
CustomLog /srv/www/sport/logs/access.log combined
But when running sport.arabba.hr i get page not found, did enable the site and it is in sites-enabled. Is part of directory being only "sport" wrong, should i put sport.arabba.hr as document root, do I need to adjust some NS settings?
So that was probably the problem. Is there a way to put files in any directory i want?
@marko_roi:
I did what you said, added A record and it says now
sport 178.79.145.163 Default
and my virtual host is like
ServerAdmin marko@arabba.hr ServerName sport.arabba.hr
ServerAlias
www.sport.arabba.hr DocumentRoot /srv/www/sport/public_html/
ErrorLog /srv/www/sport/logs/error.log
CustomLog /srv/www/sport/logs/access.log combined
But when running sport.arabba.hr i get page not found, did enable the site and it is in sites-enabled. Is part of directory being only "sport" wrong, should i put sport.arabba.hr as document root, do I need to adjust some NS settings?
Did you wait until the DNS manager pushed out your changes (it pushes every 15 minutes). Then you'll want to check to make it's working on your local machine (nslookup sport.arabba.hr)
In any case, your site is working for me now I think (sorry, I don't read Croatian
ServerName sport.arabba.hr
ServerAlias
DocumentRoot /srv/www/arabba.hr/public_html/
ErrorLog /srv/www/arabba.hr/logs/error.log
CustomLog /srv/www/arabba.hr/logs/access.log combined
So maybe that is why its working, but wondering if i can set any document root for my subdomain? Didnt know about this 15 minutes wait.