[ale] Document Root

Jerry Yu jjj863 at gmail.com
Tue Mar 28 11:52:48 EST 2006


tail your access_log to see if the request made to Apache at first. If it
made to Apache, it is a httpd.conf thingy. If not, you  may need to check
your DNS config to see if you can resolve hostA.com properly.

On 3/28/06, Richard Kolkovich <sarumont at sigil.org> wrote:
>
> On Mon, 27 Mar 2006 22:58:09 -0500
> Terry Bailey <terry at bitlinx.com> wrote:
>
> >
> > DNS knows about both.  The ServerAlias could possibly work.
> >
> > At 08:41 PM 3/27/2006, you wrote:
> >
> > >DNS has to know about each one.  Presuming that's working fine, you
> > >can possibly add a ServerAlias line in the vhost section:
> > >
> > >ServerAlias hostA.com www.hostA.com
> > >
> > >
> > >On Mar 27, 2006, at 7:37 PM, Terry Bailey wrote:
> > >
> > > >
> > > > Thanks! Works beautifully.
> > > >
> > > > Another question:
> > > >
> > > > www.hostA.com was the original web site.  Another web site was
> > > > formed, www.hostB.com.  Both work OK.  However, if  the URL,
> > > > hostA.com, is typed
> > > > in, the virtual server will not respond. You have to type in
> > > > www.hostA.com.  Moreover, if you type in hostB.com instead of
> > > > getting www.hostB.com it is the case that www.hostA.com will load
> > > > and hostB.com is
> > > > still showing in the address bar.  To get www.hostB.com, you must
> > > > type www.hostB.com.
> > > >
> > > > Each one has it's own virtual host section in httpd.conf.
> > > >
> > > > I even tried using the IP address instead of *.
> > > >
> > > > This is Apache.
> > > >
> > > >
> > > >
> > > > At 05:48 PM 3/27/2006, you wrote:
> > > >
> > > >> Sure,
> > > >>
> > > >> Just add an "alias" section in each virtual host section that
> > > >> points to
> > > >> the common area.
> > > >>
> > > >> VHost A:
> > > >>    alias /microsoft /var/www/htdocs/borg
> > > >>
> > > >> VHost B:
> > > >>    alias /msn /var/www/htdocs/borg
> > > >>
> > > >> When someone from www.vhostA.com accesses www.vhostA.com/
> > > >> microsoft/ they
> > > >> will be accessing the same content as someone accessing
> > > >> www.vhostB.com/msn/
> > > >>
> > > >> Hth, ;-)
> > > >>
> > > >> -Jim P.
> > > >>
> > > >> Terry Bailey wrote:
> > > >>>
> > > >>> If you are running virtual hosts on a web server where each
> > > >>> virtual host
> > > >>> has it's own document root, is it possible to set up a common
> > > >>> area using
> > > >>> httpd.conf so that this area can be accessed by all virtual
> > > >>> hosts?
> > > >>>
> > > >>> Thanks,
> > > >>>
> > > >>> Terry Bailey
> > > >>>
> > > >>>
> > > >>> _______________________________________________
> > > >>> Ale mailing list
> > > >>> Ale at ale.org
> > > >>> http://www.ale.org/mailman/listinfo/ale
> > > >>>
> > > >> _______________________________________________
> > > >> Ale mailing list
> > > >> Ale at ale.org
> > > >> http://www.ale.org/mailman/listinfo/ale
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> No virus found in this incoming message.
> > > >> Checked by AVG Anti-Virus.
> > > >> Version: 7.1.385 / Virus Database: 268.3.2/293 - Release Date:
> > > >> 3/26/2006
> > > >
> > > >
> > > > _______________________________________________
> > > > Ale mailing list
> > > > Ale at ale.org
> > > > http://www.ale.org/mailman/listinfo/ale
> > > >
> > >
> > >_______________________________________________
> > >Ale mailing list
> > >Ale at ale.org
> > >http://www.ale.org/mailman/listinfo/ale
> > >
> > >
> > >
> > >
> > >--
> > >No virus found in this incoming message.
> > >Checked by AVG Anti-Virus.
> > >Version: 7.1.385 / Virus Database: 268.3.2/293 - Release Date:
> > >3/26/2006
> >
> >
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://www.ale.org/mailman/listinfo/ale
>
> Also try:
>
> <VirtualHost 127.0.0.1:80>
>         ServerName      www.mydomain.com
>         ServerAlias     mydomain.com *.mydomain.com
>         ServerAdmin     webmaster at mydomain.com
>         DocumentRoot    "/home/www/mydomain.com"
> </VirtualHost>
>
> I have both my VHosts set up with the *.xxx.com in the ServerAlias
> directive and both xxx.com and www.xxx.com work for me.
>
> --
>
> Richard Kolkovich
> sarumont at sigil.org
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
-------------- next part --------------
An HTML attachment was scrubbed...




More information about the Ale mailing list