dns question

Bradley J. Bartram bradbartram at wycol.com
Wed Jun 19 14:10:03 EDT 2002


I'm glad that worked out.

Off the top of my head, if you only have one site on the apache server, you 
should just be able to point to that ip address in DNS and apache should 
answer correctly even without specifically naming virtual hosts.  At least 
that should work for the 1.3.x series (I haven't gotten to work with the 2.0 
series yet).

Of course if you really want the fun of a educational endeavour you could 
convert the url using mod_rewrite.  ;-)

brad

On Wednesday 19 June 2002 01:45 pm, Darin Perusich wrote:
> thanks brad, this is what i was looking for.
>
> to complete my question it was necessary to modify the apache config on
> our webserver so that apache would answer requests for cognigencorp.com.
> in the virtualhost container for www.cognigencorp.com i use the
> ServerAlias directive to link www.cognigencorp.com and cognigencorp.com
> together.
>
> example:
> <VirtualHost www.cognigencorp.com>
> 	ServerAdmin webmaster at cognigencorp.com
> 	DocumentRoot /www/htdocs
> 	ServerName www.cognigencorp.com
> 	ServerAlias www.cognigencorp.com cognigencorp.com
> 	...
> </VirtualHost>
>
> Bradley J. Bartram wrote:
> > For the sake of discussion say the ip address of your www server is
> > 192.168.20.2  what you would do is set, in your zone file, a line like
> > this:
> >
> > @	IN	A	192.168.20.2
> >
> > after your start of authority section.  Then in your server name space in
> > the zone file, declare your servers:
> >
> > www		A	192.168.20.2
> >
> > Here is a zone file that works like that:
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > $TTL 10800
> > @       IN      SOA     web.somedomain.com. admin.somedomain.com. (
> >                 2002032600 ; Serial
> >                 7200 ; Refresh
> >                 3600 ; Retry
> >                 604800 ; Expire
> >                 10800) ; Minimum
> >                 NS      ns1.somedomain.com.
> >                 NS      ns2.somedomain.com.
> >                 MX      5       mail.somedomain.com.
> > @       IN      A       192.168.20.2
> >
> > www          A       192.168.20.2
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > Hope that helps.
> >
> > Now if you are using name based resolution on your web server you will
> > probably have to do some other configs but this is assuming a DNS only
> > solution.
> >
> > brad
> >
> > On Wednesday 19 June 2002 12:19 pm, Darin Perusich wrote:
> >>hello all,
> >>
> >>i have a dns problem that i'm trying to resolv, ;) and i'm not getting
> >>anywhere. i'm looking to setup my dns servers to resolve
> >>www.cognigencorp.com and cognigencorp.com to the same machine.
> >>
> >>i've tried the following record to my zone files thinking it should work.
> >>
> >>cognigencorp.com.
> >>IN
> >>CNAME
> >>webserver
> >>
> >>and
> >>
> >>@
> >>IN
> >>CNAME
> >>webserver
> >>
> >>both of these statements fail, but then again they are the same as far
> >>as bind is concerned.
> >>
> >>has anyone setup their dns to resolve in such a fashion?




More information about the nflug mailing list