[PLUG] Apache Questions

Ed Sawicki ed at alcpress.com
Tue Apr 8 21:45:02 UTC 2003


On Tue, 2003-04-08 at 19:12, Mike De La Mater wrote:
> Russ has got it. If you want to type an address in the address bar and
> have it go there, it must be in the DNS tables. Lots of sites, including
> my credit union, do not have their DNS set to do this. Try
> http://www.ptcu.org and http://ptcu.org. the latter does not have a DNS
> entry, so you can't get to it without the www.
> 
> If you have access to /etc/hosts on the machine doing the browsing, you
> can add it there and avoid the of-site DNS lookup, but that's the only
> way I know of.


Most of what you say is true. However, the Web server still needs to
know the name if you're doing name-based virtual hosting. Using your
example, if www.ptcu.org is a virtual host and you don't also tell
the virtual server about the name ptcu.org, it will not work even
though the DNS has both names. If you're running Apache, you'll
need to have these in your virtual host configuration:

ServerName   www.ptcu.org
ServerAlias  ptcu.org


If your Web server is running www.ptcu.org as the main server
(not a virtual host), then what you say is completely true.

Ed


> Mike
> 
> On Tue, 2003-04-08 at 14:11, Stephen Young wrote:
> > Mike
> > 
> > Right now those three is what I have right now.  But each one has to be 
> > added to the DNS before they can be reached.  Adding DNS entries and 
> > reloading DNS whenever the instructor decideds on adding more virtual hosts 
> > can be annoying and time consuming.  So I am trying to find a dynamic way of 
> > doing it.  I don't suppose the following example will work ?
> > 
> > <VirtualHost 192.168.1.4>
> >    DocumentRoot /www/*.liquidwire.org
> >    ServerName *.liquidwire.org
> > </VirtualHost>
> > 
> > Have *.liquidwire.org point to 192.168.1.4 in the DNS.
> > 
> > Say my documentroot is /var/www/, could possibly add foo.liquidwire.org and 
> > have foo.liquidwire.org work without messing with DNS.  I haven't had a 
> > chance to try it out, just thought of it actually hehe.  Any comments ?  
> > (This is the first time I have used apache so I am a little slow with it)
> > 
> > Thanks for your responses
> > 
> > Stephen Young
> > 
> > _________________________________________________________________
> > The new MSN 8: advanced junk mail protection and 2 months FREE*  
> > http://join.msn.com/?page=features/junkmail
> > 
> > 
> > _______________________________________________
> > PLUG mailing list
> > PLUG at lists.pdxlinux.org
> > http://lists.pdxlinux.org/mailman/listinfo/plug
> 
> 
> 
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
-- 
Ed Sawicki <ed at alcpress.com>
ALC





More information about the PLUG mailing list