[TriLUG] Apache serving wrong website

Douglas Ward dward at nccumc.org
Tue Mar 11 11:27:06 EDT 2008


I'll provide some more detail:

- I host 40+ virtual domains on this box.  They are all working properly
except for this one.
- I make all of the folder names the same as the domain name.  It makes it
easier for me to keep up with them all.
- If I browse to the machine by IP address I get the first domain listed in
the virtual file.
- I have three A records in Bind: one for www.domain.org. one for
domain.organd one for
sub.domain.org.  They all point to the same IP address.
- I have restarted apache since changing vhosts.conf.

There is no default site since this box hosts virtual domains.  It seems
that apache only sees the second entry.  It's not a caching issue since I
have duplicated it from multiple operating systems, locations and
computers.  All of the normal domains work properly.  It's just this one
scenario where I try to set up the sub domain along with the domain name
that is giving me the problem.  Thanks!

On Tue, Mar 11, 2008 at 11:19 AM, Amnon <amnon at deltaforce.net> wrote:

> >  DocumentRoot /var/www/sub.domain.org
>
> I am no expert, but first off I think this path should be a folder not a
> domain
> name.
>
> > The server sends all traffic to the main domain website.  I need
> browsers
> > that visit sub.domain.org to be sent to the correct site.  It was my
> > understanding that as long as the sub domain was first in the
> configuration
> > file it would work.  Am I missing something?  Shouldn't apache be able
> to do
> > this?  I need to host both of these sites on the same server.  Any
> advice
> > would be most appreciated.  Thank you!
>
> You probably need to list that sub domain in your dns file for that
> domain.
>
> This is how it is done here.
>
> Shalom Y'all
> Amnon Nissan
>
> Deltaforce
> 919-852-2121
> http://www.deltaforce.net
>
> Host, Computers 2K8
> on 850 The Buzz  (AM 850) in Raleigh NC
> Sundays 8-10am
> http://www.850thebuzz.com/compute/
> Listen Live @ http://www.mainstreamnetwork.com/listen/asx/wrbz.asx
>
> MV stuff are at:
>  http://www.deltaforce.net/deuce/
>  http://www.ncmvpa.com
>
>
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



More information about the TriLUG mailing list