DNS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationDNS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 5th, 2003, 05:21 PM
Danimal Danimal is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: C eh N eh D eh.
Posts: 2 Danimal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Name based web hosting with DNS

Hi All!

I am trying to setup apache2 to do name based vhosting. There is **LOTS** of info on how to do this, but everyone says 'add entry to dns'

well it sounds simple..

How then, with bind9, do I add an entry to dns? (please don't say 'with vi' because I might throw up - it would be funny tho')

If someone can toss me some examples, I'll owe them beer. *****LOTS OF IT*****

My setup:
Debian 3 Linux 2.4.21
Bind9
Apache2
php4
MySQL

server name is trillian.mydomain.ca
located at /www/trillian/
new website is URL and ftp.danimal.ca
located at /www/dainmal/

from httpd.conf
<VirtualHost *>
ServerAdmin URL
DocumentRoot /www/danimal/
ServerName danimal.ca
</VirtualHost>

<VirtualHost *>
ServerAdmin URL
DocumentRoot /www/trillian/
ServerName trillian.mydomain.ca
</VirtualHost>

Reply With Quote
  #2  
Old July 6th, 2003, 06:06 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Quote:
I am trying to setup apache2 to do name based vhosting. There is **LOTS** of info on how to do this, but everyone says 'add entry to dns'

well it sounds simple..

How then, with bind9, do I add an entry to dns? (please don't say 'with vi' because I might throw up - it would be funny tho')

The problem is that there is 100 ways to setup dns depending on your network topography and software used, so describing dns setup in the apache manual would be a little bit off-topic and double its number of pages.

Adding the entry itself is really simple. What you want is called an "A record". It will point "www2.mydomain.com" to "1.2.3.4". (your new hostname to your IP) There probably is already at least one A record, "www.mydomain.com".

For bind9, you have to edit your zone file. Either with a texteditor or with a graphical frontend.
vi is a text editor. If you donīt like it, you have to find a (working) gui. I am using RH7.2 at work, iirc it comes with a kde gui for bind.

If you decide to use the text editor, it will be as simple as:
there is an entry "www IN A 1.2.3.4" or similar. Add "www2 IN A 1.2.3.4" (using the same IP address) just below that line.
Then restart bind with "service named reload" ("service bind reload"?, "ndc reload"? not sure what debian is using)
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #3  
Old July 6th, 2003, 08:40 AM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,193 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 14 h 27 m 56 sec
Reputation Power: 77
trillian.mydomain.ca
www.danimal.ca

In the first domain you said you are hosting, you say you already have setup in your DNS? Well, it would be setup in your DNS under the zone "mydomain.ca". The zone file is named for "mydomain.ca" in the named.conf as well as points to the file which contains information on that zone.

So to add www.danimal.ca to the DNS, you need to name "danimal.ca" in the named.conf that points to a new file which contains all information on "danimal.ca" including "www.danimal.ca".

Reply With Quote
  #4  
Old July 8th, 2003, 08:11 PM
DynDNS DynDNS is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 50 DynDNS User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 49 m 17 sec
Reputation Power: 6
Its been awhile since I used Bind but you need to add

zone "YourDom.com" {
type master;
file "/var/named/YourDom.com.hosts";
};

to named.conf and then edit var/named/YourDom.com.hosts file and add entries for your hosts E.G. www.yourdom.com

Sam Land
http://www.dyndnsservices.com

Reply With Quote
  #5  
Old July 10th, 2003, 01:29 AM
Danimal Danimal is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: C eh N eh D eh.
Posts: 2 Danimal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks, got it fixed...

biggest problem: named didn't have sufficient permissions to read the zone file. change ownership of the file, works perfectly.

Thanks again

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationDNS > Name based web hosting with DNS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway