Mike Woodside on 27 Sep 2007 19:51:11 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] linux question... (apache) (virtual hosts)


Sean,

Im not sure I understand what it is your doing, but I think you may be
looking for the ServerName Directive in your vhost configs

http://httpd.apache.org/docs/2.0/mod/core.html#servername

Take a look at setting that up and see if it's what you're looking for.

-Mike


-- 

On Thu, 27 Sep 2007, Sean C. Sheridan wrote:

> I tried this, no change:
>
> > <Directory /var/www/html>
> >         Options Indexes
> > </Directory>
>
> Any chance I can do this without a mod rewrite?  At the moment I am only
> responding to one IP addy, but I'll have 50 more on that box soon.
>
>
> Sean C. Sheridan
> scs@CampusClients.com
>
> Campus Party, Inc.
> 444 North Third St.
> Philadelphia, PA 19123
> (215) 320-1810, xtn 117
> (215) 320-1814 fax
> http://www.CampusClients.com
> http://www.CampusParty.com
>
>
> > Sean-
> >
> > Try not using Named Virtual Hosts for your problem. Try using a
> >
> > <Directory /var/www/whatever>
> >         Options Indexes
> > </Directory>
> >
> > before the Named Virtual Hosts line in the httpd.conf.
> >
> > Alternatively, if that's the only IP on the box, you could do a rewrite
> > rule
> > to a directory:
> >
> > RewriteRule ^/whatever - [L]
> >
> >
> > Hope this helps.
> >
> > --
> > Michael D. Bevilacqua
> > michael@bevilacqua.us
> >
> > On 9/27/07, Sean C. Sheridan <scs@campusclients.com> wrote:
> >>
> >> Ok I'll start...
> >>
> >>
> >> I have a new server, running FC6 with the default Apache install.
> >>
> >> I'm unable to do the following:
> >>
> >> Get it to respond to it's IP address differently than it's named
> >> address.
> >>
> >>
> >> Ok, so it has a cname  let's call it joe
> >>
> >> so joe.campusparty.com responds as expected, apache uses the correct
> >> directory.
> >>
> >> but if I call it at it's ip address 123.123.123.123 it goes to the exact
> >> same location.  I am, however, able to get a different response when
> >> calling it from the local machine.
> >>
> >>
> >> I add my own vhost.conf to the httpd.conf so here it is:
> >>
> >>
> >>
> >>
> >> NameVirtualHost 123.123.123.123
> >>
> >>
> >>
> >> <VirtualHost 123.123.123.123>
> >>     ServerAdmin webadmin@campusparty.com
> >>     DocumentRoot /home/joe/public_html
> >>     ServerName joe.campusparty.com
> >> #   BaseName
> >>     ErrorLog /var/log/httpd/joe_Error_log
> >>     CustomLog /var/log/httpd/joe_Access_log combined
> >> #   AllowOverride All
> >> </VirtualHost>
> >>
> >>
> >> I've tried a bunch of permutations of this:
> >>
> >> <VirtualHost _default_:*>
> >>     DocumentRoot /var/www/html
> >>     ErrorLog /var/log/httpd/error_log
> >>     CustomLog /var/log/httpd/access_log combined
> >> </VirtualHost>
> >>
> >>
> >>
> >> What I need is for apache to use a different directory when I call it at
> >> 123.123.123.123  than it uses for joe.campusparty.com
> >>
> >> No matter what I try, it seems not to work as expected.  Can I even do
> >> what I am trying, or must I give the system a name?
> >>
> >>
> >> Sean C. Sheridan
> >> scs@CampusClients.com
> >>
> >> Campus Party, Inc.
> >> 444 North Third St.
> >> Philadelphia, PA 19123
> >> (215) 320-1810, xtn 117
> >> (215) 320-1814 fax
> >> http://www.CampusClients.com
> >> http://www.CampusParty.com
> >>
> >> ___________________________________________________________________________
> >> Philadelphia Linux Users Group         --
> >> http://www.phillylinux.org
> >> Announcements -
> >> http://lists.phillylinux.org/mailman/listinfo/plug-announce
> >> General Discussion  --
> >> http://lists.phillylinux.org/mailman/listinfo/plug
> >>
> > ___________________________________________________________________________
> > Philadelphia Linux Users Group         --
> > http://www.phillylinux.org
> > Announcements -
> > http://lists.phillylinux.org/mailman/listinfo/plug-announce
> > General Discussion  --
> > http://lists.phillylinux.org/mailman/listinfo/plug
> >
>
>
>
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug