You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Leon Brooks <le...@cyberknights.com.au> on 2001/11/09 08:13:00 UTC

other/8719: mod_vhost_alias was not flexible enough, fixed, patches available

>Number:         8719
>Category:       other
>Synopsis:       mod_vhost_alias was not flexible enough, fixed, patches available
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Nov 08 23:20:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     leon@cyberknights.com.au
>Release:        1.3.20
>Organization:
apache
>Environment:
Should work for all, built and first-run tested on a andrake Linux 8.1 distribution under a Linux 2.4.13 kernel using GCC 2.96
>Description:
I like domain, www.domain, ww.domain, wwww.domain etc to all point to the same files and have collected enough domains on one particular server to render configuring for each individual domain a tedious task. I could use symlinks under mod_vhost_alias but again there would be a lot of them and it's more maintenance. I can't use mod_rewrite (unless I've read the docs wrong) because it takes effect after a virtual server path is chosen.
>How-To-Repeat:
Set up a dynamic vhost webserver with lots of names pointing to the same pages.
>Fix:
I've added an option to mod_vhost_alias which allows a list of leading text strings to be specified, at most one of which is removed before choosing a virtual server path. Modified source plus a context diff is available at http://www.cyberknights.com.au/apache/ for a limited time only. (-:

I don't know what the performance is like and haven't yet tested it extensively. If it gets used and documented, be sure to mention that the longest match should be specified first, and that while a dot at the end of the match string is optional, it is also safer.
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]