Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: I guess Ill go first
PostPosted: Sun Jul 13, 2003 1:14 am 
Offline
Senior Newbie
User avatar

Joined: Sun Jul 06, 2003 12:33 am
Posts: 15
Website: http://www.i-nfotech.com
Location: Texas
I'm trying to set up Apache to serve3 or 4 domains I already own. I would like to use virtual domains to host them, (if thats possible, since I can point the current registrars nameservers anywhere I want. (virtual.mydomain.com can be used with the forwarding option on buydomains). I just cant figure out how to get this working without a local nameserver and with the already virtual domain via linode as my primary host.(li-xx.members.linode.com) Do you have an example of a working apache conf file I can look at? If I have to add IP's I will but if I understand all this correctly I don't think I have to. Ill do whatever works the best but multiple top level domains is a must and sub (user) domains under each one would be cool too. You know , like a nested web server structure? confusing? no shit. HELP please. I will also want to use PHP and Mysql with all of them, perhpas even user level web sites (web pub for each user on the system)

_________________
Be warned that typing \fBkillall \fIname\fP may not have the desired effect on non-Linux systems, especially when done by a privileged user.


Top
   
 Post subject:
PostPosted: Sun Jul 13, 2003 5:27 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
I'll take a crack at it.

For this example, I'll use 64.1.2.3 as the IP, www.example.com and www.foobar.com as the domains.

Make sure "www.example.com" resolves to 64.1.2.3
Make sure "www.foobar.com" resolves to 64.1.2.3 too

Test it from your home computer using "nslookup www.example.com" and "nslookup www.foobar.com". The domains must be resolving to your IP to do named-based virtual hosts.

Edit your apache.conf/httpd.conf file (usually in /etc/apache or /etc/httpd/conf/). Here's some examples:

Code:
...
Port 80
ServerName li-3.members.linode.com
DocumentRoot /var/www/html

NameVirtualHost *

 <VirtualHost *>
DocumentRoot /www/example.com
ServerName www.example.com example.com
...
</VirtualHost>

<VirtualHost *>
DocumentRoot /www/foobar.com
ServerName www.foobar.com foobar.com
...
</VirtualHost>


This would serve three sites. The linode's default address would be served out of /var/www/html. Requests to "www.example.com" would be served out of /www/example.com, and foobar.com out of /www/foobar.com.

Check out http://httpd.apache.org/docs/vhosts/examples.html

Apache is very flexible. It will do what you tell it :-)

-Chris


Top
   
PostPosted: Mon Jul 14, 2003 4:16 am 
Offline
Senior Newbie
User avatar

Joined: Sun Jul 06, 2003 12:33 am
Posts: 15
Website: http://www.i-nfotech.com
Location: Texas
ok so it looks pretty simple - the linode domain HAS to be the primary apparently. Will the document paths listed work with multiple users and mySQL? Do i need to create a system user for each virtual domain? I just keep wondering where UML starts changing things. And thanks for your help. I'll let u know how it goes when i try it.

_________________
Be warned that typing \fBkillall \fIname\fP may not have the desired effect on non-Linux systems, especially when done by a privileged user.


Top
   
PostPosted: Mon Jul 14, 2003 12:00 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
ne0 wrote:
ok so it looks pretty simple - the linode domain HAS to be the primary apparently. Will the document paths listed work with multiple users and mySQL? Do i need to create a system user for each virtual domain? I just keep wondering where UML starts changing things. And thanks for your help. I'll let u know how it goes when i try it.


The Linode's IP/domain does NOT have to be the first, or in there at all.

mySQL uses it's own path to store it's databases.

Creating a system user for each domain is useful if you plan on providing them an FTP account, so they can update their sites.

Also -- UML doesn't change any of this. It is just like a 'regular' machine.

Good luck!
-Chris


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