httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 39928] port no detected when file name not in URL
Date Fri, 07 Nov 2008 16:05:18 GMT

--- Comment #2 from Marc Mengel <>  2008-11-07 08:05:17 PST ---
Okay, so after much confusion, I have a workaround for this.

First, you have to use Rewrite based mass virtual hosting, and
second you have to set an environmnent variable (i.e. MY_PORT).

So instead of:
  VirtualDocumentRoot /appora/products/web/%0:%p/html
  VirtualScriptAlias  /appora/products/web/%0:%p/cgi-bin

You need:
  RewriteCond %{ENV:MY_PORT} ^$ 
  RewriteRule (.*) $1 [env=MY_PORT:%{SERVER_PORT}]
  RewriteMap lowercase int:tolower
  RewriteCond %{REQUEST_URI} !/cgi-bin/
  RewriteRule ^/(.*)$  
  RewriteCond %{REQUEST_URI} /cgi-bin/
  RewriteRule ^/(.*)$   /appora/products/web/%{SERVER_NAME}:%{ENV:MY_PORT}/$1

This is the cook book Rewrite based mass virtual hosting, except for the part
about setting MY_PORT if it isn't set, and using MY_PORT instead of

Basically, somewhere the SERVER_PORT stuff gets lost when doing things like
doing an index.html lookup, but the MY_PORT environment variable doesnt.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message