I have finally got my DNS server working and am able to type in my primary domain name to get to my website on the internet.
I am capable of typing in
www.mydomain.com or just mydomain.com and it takes me to the same place.
The problem is that I have a couple more domain names that I would like to add. I'm sure I have my httpd.conf "virtual domain"
filled out correctly. I will include it below for referance.
I think my problem is in my zone files. I have tried different configurations for the new domain but cant seem to get it.
what am I missing???
Below is a copy of my httpd.conf virtual domains section and my zone files for my primary domain and my secondary domain.
Both domains are, differant, both are registered and pointing to my ip address.
*******Zone file for my primary domain
$TTL 86400
domain1.com. IN SOA domain1.domain1.com. me.domain1.com. (
4 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
IN NS ns1.domain1.com.
IN NS ns2.othernameserver.com.
; Define local hosts
localhost IN A 127.0.0.1
@ IN A 111.222.333.444
www IN A 111.222.333.444
ns1.domain1.com. IN A 111.222.333.444
******And this is the zone file for my second domain name!!!
$TTL 86400
@ IN SOA domain2.com. him.domain2.com. (
4 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
IN NS ns1.domain1.com
IN NS ns2.othernameserver.com.
; Define local hosts
@ IN A 111.222.333.444
www IN A 111.222.333.444
*******This is my named.conf file!
## named.conf - configuration for bind
#
# Generated automatically by bindconf, alchemist et al.
options {
directory "/var/named/";
query-source address * port 53;
};
zone "0.0.127.in-addr.arpa" {
type master;
file "0.0.127.in-addr.arpa.zone";
};
zone "domain1.com" {
type master;
file "db.com-domain1";
};
zone "domain2.com" {
type master;
file "db.com-domain2";
};
zone "localhost" {
type master;
file "localhost.zone";
};
******And finally this is my httpd.conf "virtual domains"
# Virtual host Default Virtual Host
<VirtualHost _default_:*>
ServerName _default_
DirectoryIndex index.php index.html index.htm index.shtml
ServerSignature email
LogLevel warn
HostNameLookups off
</VirtualHost>
# Virtual host domain1.com
<VirtualHost 111.222.333.444>
ServerAdmin
me@domain1.com
ServerName domain1.com
ServerAlias
www.domain1.com
<Directory "/var/www/html/">
AllowOverride none
</Directory>
ServerSignature email
TransferLog logs/domain1-access_log
ErrorLog logs/domain1-error_log
</VirtualHost>
# Virtual host domain2.com
<VirtualHost 111.222.333.444>
ServerAdmin
him@domain2.com
ServerName domain2.com
ServerAlias
www.domain2.com
DocumentRoot /var/www/html/domain2/
<Directory "/var/www/html/domain2/">
AllowOverride none
</Directory>
ServerSignature email
TransferLog logs/domain2-access_log
ErrorLog logs/domain2-error_log
</VirtualHost>
Ive been trying different configurations for over a week now and cant seem to get it. Any help would be appreciated...
thewoz.