[TriLUG] Apache serving wrong website
Tim Jowers
timjowers at gmail.com
Tue Mar 11 14:54:46 EDT 2008
Hi Doug,
Would you need to add sub.domain.org to /etc/hosts? I don't see why you
would but know I added all of my domains there. Maybe I did this for local
testing. E.g. if sub.domain.org is not in your DNS resolution then I would
have guessed you'd have gotten a network error.
Foolish idea but maybe try changing the ServerName from domain.org to
www.domain.org. And I guess you've tried reordering the entries. This is how
I thought it should work also, I'll check my setup later to verify.
Let em know as I am setting this up on one of my servers too. I'll have to
check what I set up.
Tim
On Tue, Mar 11, 2008 at 12:15 PM, Douglas Ward <dward at nccumc.org> wrote:
> To be honest, I've kept the default CentOS settings. I have read the conf
> file twice and can't see anything that conflicts. I could be suffering
> from
> lack of apache knowledge though...
>
> On Tue, Mar 11, 2008 at 11:48 AM, Marc Wiatrowski <mwia at iglass.net> wrote:
>
> > Nothing in conf/httpd.conf that would be conflicting?
> >
> > On Tue, 2008-03-11 at 10:52 -0400, Douglas Ward wrote:
> > > I have an apache server (CentOS 5 - httpd-2.2.3-11.el5_1.centos.3)
> that
> > > isn't returning web pages in the way that I think it should. Here's
> my
> > > entry in vhosts.conf:
> > >
> > > <VirtualHost x.x.x.x>
> > > ServerAdmin admin at domain.org
> > > DocumentRoot /var/www/sub.domain.org
> > > ServerName sub.domain.org
> > > ServerAlias sub.domain.org
> > > ErrorLog logs/sub.domain.org_error_log
> > > CustomLog logs/sub.domain.org-access_log common
> > > </VirtualHost>
> > >
> > > <VirtualHost x.x.x.x>
> > > ServerAdmin admin at domain.org
> > > DocumentRoot /var/www/domain.org
> > > ServerName domain.org
> > > ServerAlias domain.org www.domain.org
> > > ErrorLog logs/domain.org_error_log
> > > CustomLog logs/domain.org-access_log common
> > > </VirtualHost>
> > >
> > >
> > > 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!
> >
> > --
> > 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/
> >
> --
> 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