Rick wrote:
> I've been working on setting up a web server on DSL, with which I will
> host multiple domain names from the same IP address. I have set up
> what will be my "main" domain name and it is working fine. I set up
> bind/named to host my own name server, and set up "ns1.mydomain.com",
> "ns2.mydomain.com" with my domain registrar to point to the name server
> at my IP address. The main domain is working perfectly with Apache.
>
> Now I'd like to set up an additional domain to run as another
> VirtualHost from the same IP address. I have configured that domain at
> my registrar with the DNS servers "ns1.mydomain.com",
> "ns2.mydomain.com". What other steps do I need to follow to get this
> domain pointing to the correct site? I have already set the site up in
> the httpd.conf file, presumably the correct way. I suspect I may have
> to add another "hosts" file to bind/named, but I'm not sure how to
> configure it.
>
> Any help and input would be excellent. Thanks in advance.
>
> Rick
>
Here's how I do it with dyndns.org on a Slackware box;
Listen 80
BindAddress *
ServerName
www.xxxx.dyndns.org
# --- I put mine in /home
DocumentRoot "/home/www/blogsite"
# This should be changed to whatever you set DocumentRoot to.
<Directory "/home/www/blogsite">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Use name-based virtual hosting.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin
(E-Mail Removed)
ServerName xxxx.dyndns.org
ServerAlias *.xxxx.dyndns.org
DocumentRoot /home/www/blogsite
ErrorLog /var/log/apache/blogsite_error_log
CustomLog /var/log/apache/blogsite_access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin
(E-Mail Removed)
ServerName yyyyy.dyndns.org
ServerAlias *.yyyyy.dyndns.org
DocumentRoot /home/www/yyyyy
ErrorLog /var/log/apache/yyyyy_error_log
CustomLog /var/log/apache/yyyyy_access_log common
</VirtualHost>
Hope I didn't miss anything.
--Robert