LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-31-2001, 12:16 PM   #1
thewoz
LQ Newbie
 
Registered: Oct 2001
Location: Canada
Distribution: RH 7.1
Posts: 5

Rep: Reputation: 0
Unhappy Please Help.. Going Crazy With Virtual Host


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.
 
Old 11-01-2001, 07:21 AM   #2
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Rep: Reputation: 30
instead of using your IP in the VirtualHost tag, try using the domain itself (i.e. <VIRTUALHOST www.domain.com>). i ran into similar problems, and was able to correct the situation by using the domain name and not the IP. hope it helps. :-)
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Host abridge Linux - Software 1 04-13-2005 07:35 AM
I'm going crazy with my Xwindows problem...Virtual heighT? vdogvictor Slackware 9 07-29-2004 03:16 PM
virtual host ziggie216 Linux - General 2 12-22-2003 06:38 PM
Virtual Host |Drakehash| Linux - Networking 0 07-17-2003 03:02 PM
VIrtual host thep Linux - General 10 08-06-2002 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration