Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Virtual Hosts
PostPosted: Sat May 22, 2010 10:58 am 
Offline
Newbie

Joined: Sat May 22, 2010 10:55 am
Posts: 4
So, I'm usually used to making 1 site per VPS, but I need to host 2 on 1 VPS to save money. I have fedora 12 and apache on it. This is my vhost.conf file
Code:
NameVirtualHost *:80

<VirtualHost *:80>
   ServerAdmin liquid.1520@al-rs.net
   ServerName teamlnd.com
   ServerAlias www.teamlnd.com
   DocumentRoot /home/stryker/www/
   ErrorLog /home/stryker/logs/error.log
   CustomLog /home/stryker/logs/custom.log combined
</VirtualHost>

<VirtualHost *:80>
   ServerAdmin liquid.1520@al-rs.net
   ServerName rs-legacy.com
   ServerAlias www.rs-legacy.com
   DocumentRoot /home/legacy/www/
   ErrorLog /home/legacy/logs/error.log
   CustomLog /home/legacy/logs/custom.log combined
</VirtualHost>


I just want to make sure that it's right before I switch servers.
And, my domains are hosted on godaddy + 1and1. If I pointed the domains to those IPs, would it work fine right now? Or would I need to do something else?


Top
   
 Post subject:
PostPosted: Sat May 22, 2010 12:13 pm 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
Seems perfectly good, just check twice if the user webserver's running at has read (and write, if necessary) access to the site dirs.
And yes, you just need to point the A records for "@" and "www" in your current domain control panel to the Linode's IP.

Also, if you want to do a "dry test" before switching the DNS, you can add a line
Code:
your.linodes.ip.addr teamlnd.com www.teamlnd.com rs-legacy.com www.rs-legacy.com

to your /etc/hosts or %SystemRoot%\system32\drivers\etc\hosts file, to make your own PC access the Linode when given one f these names.


Top
   
 Post subject:
PostPosted: Sun May 23, 2010 11:16 am 
Offline
Newbie

Joined: Sat May 22, 2010 10:55 am
Posts: 4
Ok thanks, and should I remove that line once I point the domains, or no?

Also, I have the domains already pointed to the site, which is on another host. Is there anyway I can test it without having to re-point the domains?


Top
   
 Post subject:
PostPosted: Sun May 23, 2010 11:39 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
The hosts file "overrides" DNS resolution.
So, if you have a line in hosts file binding a domain name to some IP, it doesn't matter if the DNS isn't pointing to anywhere, or to somewhere else; your machine will use the IP specified.
So, it's a perfect way to test the "new" server while leaving the domain (and thus, everyone else in the world :)) to the "old" working address.
Once you're done, remove the line and repoint the DNS to new one, to switch the "whole Internet" to the new address.


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


Who is online

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