virtualhosts, dns, and cnames. For the love of God, please help me!

From: Ohmster (donteven_at_thinkaboutit.com)
Date: 05/31/04


Date: Mon, 31 May 2004 00:45:52 GMT

Crossposted to alt.os.linux, alt.apache.configuration,
comp.os.linux.networking. I really need help and am sorry for crossposting
but the FAQ says that up to three groups is allowed. I did not set a
followup.

I read docs, I googled, I tried, I cried. Please help!

I have a redhat 9 server that has worked just fine for years. I connect to
the internet with the roaring penguin script, my ADSL modem connects via
ethernet to nic in my redhat machine. 2nd nic connects to hub to act as
gateway for two XP machines. I run sendmail and use my domain for a mail
server, apache, and vsftpd.

I have a FQDN from networksolutions and get my DNS from no-ip.com. This has
always worked very well, I get DNS for my domain, www, ftp, mail, and an MX
record for sendmail. I have userdirs turned on in httpd.conf and allow
everything for options so that I can use cgi, both in and out of cgi
directories, and .htaccess files to control access. I run a family website
and have run it from my home directroy so the URL to the family site is a bit
hard to remember. I purchased a family domain name from 000domains.com and
want to run a virtual host on my machine.

I tried to add my family domain as a cname at no-ip.com but then they want
another $19 a year. Forget it, this is a zero income project and I cannot
afford this. I went to zoneedit.com and signed up for DNS for my family
domain. Now my family domain and my regualar domain both point to my redhat
machine. I cannot get virtualhosts to work right to save my life.

Should I drop no-ip.com and go over to zoneedit.com and remove my original
family domain, then setup my regular domain and then add the family domain as
a cname? Is it wrong to have two DNS services directing two different domains
to the same IP address? I would then have to go to networksolutions.com and
change the nameserver for my regular domain.

When I tried to add the virtualhost to my httpd.conf file, I ran into nothing
but problems. As soon as I add:

<VirtualHost *>

to the bottom of my httpd.conf file, it wipes out my root server. This is
what I have tried...

<VirtualHost *>
    ServerAdmin me@mydomain.com
    DocumentRoot /home/me/public_html/family
    ServerName www.myfamily.org
    ServerAlias myfamily.org *.myfamily.org
    ErrorLog /home/me/public_html/family/logs/host.myfamily.org-error_log
    CustomLog /home/me/public_html/family/logs/host.myfamily.org.-access_log
combined
</VirtualHost>

<VirtualHost *>
    ServerAdmin mel@mydomain.com
    DocumentRoot /var/www/html
    ServerName www.mydomain.com
    ServerAlias mydomain.com *.mydomain.com
    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log common
</VirtualHost>

If I put mydomain first, the family domain does not work. If I put the family
domain first, then mydomain does not work.

I also want cgi, both in and out of cgi-bin directories. (The phone book that
I use is java-cgi and the files for it run cgi scripts but they do not go in
a cgi-bin directory.

Everything worked so good until I tried to add the family domain. I had to
take the virtual domains out for now but my family stuff is hosed because it
is all changed to reflect the new family domain URLs.

Can somebody, please, anybody help with this? What am I doing wrong here? Is
the asterisk screwing me up in the <VirtualHost *> part?

-- 
Of course my email address is invalid.
Email me by assembling this address:
tinykitty /a/t/ ohmster dot com
~Ohmster

Quantcast