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

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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old February 22nd, 2001, 11:04 PM
chuckf chuckf is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 2 chuckf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

I am trying to configure a subdomain.
I have a freebsd/apache machine.

The jist of my question is... I just can't seem to get it to go right.. how do you set this up?

Currently I modify /etc/namedb/mydomain.com.db file, adding the subdomain in this manner:

subdomain.domainname.com. IN A 111.111.111.1
#(not actual ip obviously)

Ive also tried it using the above and a cname record
IN CNAME subdomain.domainname.com.

and several other types of configurations

I also added the subdomain to my /etc/namedb/named.conf file, making it a master and refering it to the domain.com.db file mentioned above.

It seems to almost work, but maybe someone can point me in the right direction, or point out my error.

Thanks in advance,

Chuck

Reply With Quote
  #2  
Old February 23rd, 2001, 03:45 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You can have multiple A record pointing to the same IP or multiple CNAME with at least one A record, both should work. Or you can even have a wildcard A record plus your default A record.

Anyhow, you need to ensure forward nslookup of your subdomain.domainname.com returns the same IP (111.111.111.1) before going any further to configure Apache.

If you need further helps, be sure to provide more info (not enough currently).

Reply With Quote
  #3  
Old February 23rd, 2001, 11:36 AM
chuckf chuckf is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 2 chuckf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the reply freebsd.

I have a machine with primary & 2nd dns (although I dont use the 2nd as far as I know, at this time), on that machine are my sites.
I'll just explain my set up and hopefully the error will glare.

Using 111.111.1.245 as dns for myserver.com
111.111.1.5 as MX
111.111.1.100 as ip for mydomain.com
111.111.1.200 as ip for subdomain.mydomain.com


In my http.conf file my entries refering to this site are:

<VIRTUALHOST 111.111.1.100>
DocumentRoot /var/www/public_access/mydomain.com
ServerName mydomain.com
</VIRTUALHOST>

<VIRTUALHOST 111.111.1.200>
DocumentRoot /var/www/public_access/subdomain.mydomain.com
ServerName subdomain.mydomain.com
</VIRTUALHOST>

#######
## NOTE: If i ping either mydomain.com or subdomain.mydomain.com It will go to 111.111.1.100 (to mydomain.com)
###########

In my named.conf file, among the other normal entries, are the entries for these sites.

zone "mydomain.com" {
type master;
file "dbs/mydomain.com.db";
};

zone "subdomain.mydomain.com" {
type master;
file "dbs/mydomain.com.db";
};

###I have one .db file, as shown above, and that is for mydomain.com at mydomain.com.db. I refer subdomain.mydomain.com to this same db.

The name server entries for that .db are as follows (the normal stuff, refresh, retry, expire, etc are all there as well, these are just the entries below that):

IN NS ns1.myserver.com.
IN NS ns2.myserver.com.
IN A 111.111.1.100
IN MX 10 mail.mydomain.com
www IN A 111.111.1.100
ftp IN A 111.111.1.100
mail IN A 111.111.1.5
* IN A 111.111.1.100
subdomain.mydomain.com. IN A 111.111.1.200
subdomain. IN A 111.111.1.200

###I noticed in the post preview that this board scrunches my entries, sorry if the IN records are difficult to read.

Freebsd, hopefully this is enough for you and thanks once again!

Reply With Quote
  #4  
Old February 24th, 2001, 06:44 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> If i ping either mydomain.com or subdomain.mydomain.com It will go to 111.111.1.100 (to mydomain.com)

1) * IN A 111.111.1.100
2) subdomain.mydomain.com. IN A 111.111.1.200

*.mydomain.com matches subdomain.mydomain.com so need to give (2) higher priority by moving it higher, as high as the first A record.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > DNS - Configuring subdomains


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 2 hosted by Hostway