You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Behlendorf <br...@organic.com> on 1997/01/24 11:13:25 UTC

problem with mod_rewrite?

Hmm, for the apache config I have

  <VirtualHost 204.152.144.38>
  DocumentRoot /export/pub/apache
  ErrorLog /var/log/hterror_log.apache
  ServerName www.apache.org
  Redirect /docs/1.1 http://www.apache.org/docs
  Redirect /docs/vif.info http://www.apache.org/docs/misc/vif.info
  RewriteEngine on
  RewriteRule ^/docs/mod_(.*)$ /docs/mod/mod_$1 [R]
  </VirtualHost>

It used to be that the "RewriteRule" would send a redirect to folks trying to
get to 

  http://www.apache.org/docs/mod_include.html (for example) 

to go instead to 

  http://www.apache.org/docs/mod/mod_include.html

Now it's just giving a redirect pointing them to 

  http://www.apache.org/doc

This happened some time in the last week, though before Wednesday which is
when I have the first report of a problem.  Ralf?

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  www.apache.org  hyperreal.com  http://www.organic.com/JOBS


Re: multiple non-IP intensive virtual hosts

Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Thu, 30 Jan 1997, Rob Hartill wrote:

> Can this be documented someplace, preferebly in the manual AND the
> .conf file provided with the source. If it is documented, it probably

The conf files don't document Host-based vhosts at all. The manual
very clearly specifies it, at http://www.apache.org/docs/host.html. If
people don't RTFM, there's nothing *we* can do.

What really needs to be done is to write an optional GUI interface
that's intuitive; as opposed to what we have now.

-- 
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/


Re: multiple non-IP intensive virtual hosts

Posted by Rob Hartill <ro...@imdb.com>.
On Wed, 29 Jan 1997, Alexei Kosut wrote:

> If they're Host-based servers (they have the same IP address as the
> main server), then you should use the following:
> 
> <VirtualHost a.us.com>
> DocumentRoot /whatever
> ServerName a.us.com
> ServerAlias b.us.com
> </VirtualHost>
> 
> That's what ServerAlias is for. It lets you give Host-based virtual
> hosts any number of names (you can use wildcards, too).


Can this be documented someplace, preferebly in the manual AND the
.conf file provided with the source. If it is documented, it probably
needs to be made clearer.
I had a report to bugs mail about this where the submitter looked at
the docs and decided that the multiple names could go in the
<VirtualHost > line. The docs quote he showed me seemed to support
his interpretation.

> The multiple names in <VirtualHost> only works, I believe, if they
> have seperate IP addresses; that's what it was written for, I believe.

Doh!   :-)
 

Re: multiple non-IP intensive virtual hosts

Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Wed, 29 Jan 1997, Michael Smith wrote:

> I'm not sure if this should work or not - the documentation has yet to
> be written :), but I tried to have something like this in my config (it
> was 1.2b4):
> 
> <VirtualHost a.us.com b.us.com>
>   DocumentRoot /whatever
>   ServerName a.us.com
> </VirtualHost>
> 
> where a.us.com and b.us.com represent the same IP address.  However,
> only a.us.com actually seems to get recognised in this part of the
> config.  Should b.us.com work too, or do I need to have

If they have a different IP address than the main server, it shouldn't
matter what it says in VirtualHost and ServerName.

If they're Host-based servers (they have the same IP address as the
main server), then you should use the following:

<VirtualHost a.us.com>
DocumentRoot /whatever
ServerName a.us.com
ServerAlias b.us.com
</VirtualHost>

That's what ServerAlias is for. It lets you give Host-based virtual
hosts any number of names (you can use wildcards, too).

The multiple names in <VirtualHost> only works, I believe, if they
have seperate IP addresses; that's what it was written for, I believe.

-- 
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/


Re: multiple non-IP intensive virtual hosts

Posted by Dean Gaudet <dg...@arctic.org>.
No you need to have:

<VirtualHost a.us.com>
  DocumentRoot /whatever
  ServerName a.us.com
  ServerAlias b.us.com
</VirtualHost>

Although see my diatribe about DNS in the VirtualHost statement in the
archives... I personally put ip addresses in the VirtualHost statement.

I thought the docs for this were written already.

Dean

On Wed, 29 Jan 1997, Michael Smith wrote:

> I'm not sure if this should work or not - the documentation has yet to
> be written :), but I tried to have something like this in my config (it
> was 1.2b4):
> 
> <VirtualHost a.us.com b.us.com>
>   DocumentRoot /whatever
>   ServerName a.us.com
> </VirtualHost>
> 
> where a.us.com and b.us.com represent the same IP address.  However,
> only a.us.com actually seems to get recognised in this part of the
> config.  Should b.us.com work too, or do I need to have
> 
> <VirtualHost a.us.com>
>   ServerName a.us.com
> </VirtualHost>
> <VirtualHost b.us.com>
>   ServerName b.us.com
> </VirtualHost>
> <VirtualHost a.us.com b.us.com>
>   DocumentRoot /whatever
> </VirtualHost>
> 
> Essentially a.us.com is the main name for the server, but I don't mind
> if people call it b.us.com - though I know they'd still get redirected
> to a.us.com with a server redirect.
> 
> Mike
> 


multiple non-IP intensive virtual hosts

Posted by Michael Smith <mj...@cursci.co.uk>.
I'm not sure if this should work or not - the documentation has yet to
be written :), but I tried to have something like this in my config (it
was 1.2b4):

<VirtualHost a.us.com b.us.com>
  DocumentRoot /whatever
  ServerName a.us.com
</VirtualHost>

where a.us.com and b.us.com represent the same IP address.  However,
only a.us.com actually seems to get recognised in this part of the
config.  Should b.us.com work too, or do I need to have

<VirtualHost a.us.com>
  ServerName a.us.com
</VirtualHost>
<VirtualHost b.us.com>
  ServerName b.us.com
</VirtualHost>
<VirtualHost a.us.com b.us.com>
  DocumentRoot /whatever
</VirtualHost>

Essentially a.us.com is the main name for the server, but I don't mind
if people call it b.us.com - though I know they'd still get redirected
to a.us.com with a server redirect.

Mike