httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: config/234: REMOTE_IDENT not always available to mod_rewrite
Date Mon, 17 Mar 1997 05:45:30 GMT
Actually knowing that it's the same ip as the server makes a world of
difference.  It's not strictly possible to have a virtual host which
matches the same ip and name as the server itself.  It won't ever match
the virtualhost, and will always serve the hit from the "main server" part
of the config.  You can kludge around it a bunch of ways: 

- give the main server a bogus ServerName but which has a DNS entry that
  doesn't match the ip address you want to use... i.e. localhost

- get the 1.2b8-dev snapshot <ftp://hyperreal.com/httpd/from-cvs> and
  create a virtual host using the magic token <VirtualHost _default_>

- try using <VirtualHost 255.255.255.255> and 1.2b7 code (if this has a
  dns problem then you need the 1.2b8-dev snapshot to fix it)

- use another ip address

- stick IdentityCheck off in all the other vhosts and IdentityCheck on in
  the main server part

I'm sure there are others.  What sucks is that there's no clean solution,
and this has to do with the overloaded semantics of <VirtualHost>.  It's
used to define both vhosts that are ip-based and those that are name-based
(i.e. non-ip-intensive, introduced in 1.1). 

To new-httpd folk:  Another possible workaround in our code is to assume
that if there exists exactly one vhost with the same ip as the server then
it is *not* name-based.  That should fix even more of these problems.  Fix
them long enough for us to get around to revamping the config syntax to
avoid all these ambiguities.  I could add this to my latest patch for
vhost-confusion. 

Dean

On Sun, 16 Mar 1997, Michael Fuhr wrote:

> System info:
> 
>     * FreeBSD 2.1.7 (running on a Pentium 100)
>     * gcc 2.6.3
>     * Apache 1.2b7
> 
> The virtual host has the same IP as the server.  I tried changing
> it to <VirtualHost a.b.c.d> and adding the ServerName directive
> as you suggested, but I still get the same behavior - REMOTE_IDENT
> isn't available to my RewriteCond unless I turn on IdentityCheck
> outside of <VirtualHost>.
> 
> Unfortunately this is the only system I have free reign over, so
> I can't test it on other architectures.  Looks like I'll have to
> post to comp.infosystems.www.servers.unix and see if anyone else
> can reproduce the problem.  This may not matter, but here's my diff
> for src/Configuration:
> 
>     157c157
>     < # Module rewrite_module      mod_rewrite.o
>     ---
>     > Module rewrite_module      mod_rewrite.o
>     169c169
>     < # Module status_module             mod_status.o
>     ---
>     > Module status_module       mod_status.o
>     174c174
>     < # Module info_module         mod_info.o
>     ---
>     > Module info_module         mod_info.o
>     210c210
>     < # Module expires_module            mod_expires.o
>     ---
>     > Module expires_module      mod_expires.o
>     215c215
>     < # Module headers_module      mod_headers.o
>     ---
>     > Module headers_module      mod_headers.o
>     230c230
>     < # Module usertrack_module      mod_usertrack.o
>     ---
>     > Module usertrack_module      mod_usertrack.o
>     235c235
>     < # Module proxy_module        modules/proxy/libproxy.a
>     ---
>     > Module proxy_module        modules/proxy/libproxy.a
> 
> Thanks for trying to help - I'll see what else I can do to isolate
> the problem.
> 
> Dean Gaudet writes:
> 
> > I still can't reproduce it, even against the released 1.2b7.  What
> > architecture are you on? 
> > 
> > Does the <VirtualHost> ip address overlap the address of the server
> > itself?  Can you try rewriting it as: 
> > 
> > <VirtualHost a.b.c.d>
> > ServerName piglet.pooh.org
> > ...
> > </VirtualHost>
> 
> -- 
> Michael Fuhr
> http://www.dimensional.com/~mfuhr/
> 


Mime
View raw message