httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45524] New: Specifying multiple vhost aliases
Date Fri, 01 Aug 2008 17:50:27 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45524

           Summary: Specifying multiple vhost aliases
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: mod_vhost_alias
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: kyle.gibson@frozenonline.com


Per server configuration only one VirtualDocumentRoot setting is permitted or
used as far as I could tell from the mod_vhost_alias.c code and the
documentation provided.

This means theoretical configurations such as

VirtualDocumentRoot /usr/local/apache/vhosts/%2.0.%3.0
VirtualDocumentRoot /usr/local/apache/backwards/%3.0.%2.0

may not be possible, or at least difficult to setup correctly. What really
seems to happen is that the second call to VDR will overwrite the first call.

The above configuration could probably be solved if VDR worked within Directory
blocks, and VDR allowed relative paths.

<Directory /usr/local/apache/vhosts/>
VirtualDocumentRoot %2.0.%3.0
</Directory>

<Directory /usr/local/apache/backwards/>
VirtualDocumentRoot %3.0.%2.0
</Directory>

Here's what I've patched into the apache source:

AddVirtualDocumentRoot /home/www/%0/www
AddVirtualDocumentRoot /home/www/%-2.0.%-1/%-3+/

The mappings are saved in a list, and each one is tested in the order it was
given until a match is found.

This can easily be extrapolated to provide a fall-back solution in case none of
the mappings match. Simply make the last VDR guaranteed to match.

My apache code is hackish at best. As a result I am not including the patch
just yet. I wanted to post this now that I've got it working and to let those
who may be interested know that it is on the way. I'll probably upload the
patch tonight or tomorrow.

Also I want to ensure that it integrates well with the DOCUMENT_ROOT patch.

Any questions, comments, suggestions please contact me. Send flames and insults
to /dev/null.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message