Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Nov 05, 2011 8:06 pm 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
I would like to create subdomain on my linode and have it online. What do i need to do in DNS manager and what on linode, setup some virtual host?


Top
   
 Post subject:
PostPosted: Sat Nov 05, 2011 8:32 pm 
Offline
Senior Member
User avatar

Joined: Thu Jun 16, 2011 8:24 am
Posts: 412
Location: Cyberspace
You need to go to your DNS and create a new A record for your subdomain. If you use Linode's DNS manager, go to Linode Manager -> DNS Manager -> Your Domain A/AAAA Records -> Add a New A Record. Type what you want the subdomain to be and your Linode's IP address. Save it.

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.

_________________
Kris the Piki Geeker


Top
   
 Post subject:
PostPosted: Sun Nov 06, 2011 10:32 am 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
I did what you said, added A record and it says now

sport 178.79.145.163 Default

and my virtual host is like

<VirtualHost *:80>
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
</VirtualHost>

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?


Top
   
 Post subject:
PostPosted: Sun Nov 06, 2011 10:48 am 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
I see now that "I cant" setup document root to be other then the one that is set up in main domain. Like it said here

http://davidpodley.com/2010/02/11/setti ... nd-apache/

So that was probably the problem. Is there a way to put files in any directory i want?


Top
   
 Post subject:
PostPosted: Sun Nov 06, 2011 10:49 am 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
marko_roi wrote:
I did what you said, added A record and it says now

sport 178.79.145.163 Default

and my virtual host is like

<VirtualHost *:80>
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
</VirtualHost>

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 :) )


Top
   
 Post subject:
PostPosted: Sun Nov 06, 2011 10:50 am 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
I changed setting to

<VirtualHost *:80>
ServerAdmin marko@arabba.hr
ServerName sport.arabba.hr
ServerAlias www.sport.arabba.hr
DocumentRoot /srv/www/arabba.hr/public_html/
ErrorLog /srv/www/arabba.hr/logs/error.log
CustomLog /srv/www/arabba.hr/logs/access.log combined
</VirtualHost>


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.


Top
   
 Post subject:
PostPosted: Sun Nov 06, 2011 11:03 am 
Offline
Senior Member
User avatar

Joined: Thu Jun 16, 2011 8:24 am
Posts: 412
Location: Cyberspace
If /srv/www/arabba.hr/public_html/ is the document root for your your main domain and you want something different for sport.arabba.hr, you'll need to give it a different document root and put whatever you want it to display in your new document root. Your document root for sport.arabba.hr needs to exist and have an index.htm, index.html, or index.php that will display something. Apache should recognize any of those three as your main page, though you should only have one (not all three).

_________________
Kris the Piki Geeker


Top
   
 Post subject:
PostPosted: Sun Nov 06, 2011 11:23 am 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
Piki, all of that I did, maybe its a DNS problem and needs to propagate, I'll leave it for some time and see.


Top
   
 Post subject:
PostPosted: Sun Nov 06, 2011 11:33 am 
Offline
Senior Member
User avatar

Joined: Thu Jun 16, 2011 8:24 am
Posts: 412
Location: Cyberspace
Possible. Depends on how often your ISP updates their DNS. Most update within a couple of hours, though a rare few will take 24+ hours.

_________________
Kris the Piki Geeker


Top
   
 Post subject:
PostPosted: Sun Nov 06, 2011 12:02 pm 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
sport.arabba.hr works for me, I'm seeing Drupal's setup page. If you want to have www.sport you need to add an A record for the www as well.


Top
   
 Post subject:
PostPosted: Sun Nov 06, 2011 12:48 pm 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
Then its due to my ISP provider to make this work, Drupal setup page is what should be shown but i still get that page not found. Thanx on help I guess tomorrow it will be working.


Top
   
 Post subject:
PostPosted: Mon Nov 07, 2011 10:12 am 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
It was due to time taken to update. thanks on help.


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


Who is online

Users browsing this forum: No registered users and 6 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