You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/08/01 19:50:27 UTC
DO NOT REPLY [Bug 45524] New: Specifying multiple vhost aliases
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
DO NOT REPLY [Bug 45524] Specifying multiple vhost aliases
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45524
rahul <ra...@sun.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
--
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
DO NOT REPLY [Bug 45524] Specifying multiple vhost aliases
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45524
--- Comment #1 from Kyle Gibson <ky...@frozenonline.com> 2008-08-02 13:53:53 PST ---
Created an attachment (id=22347)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=22347)
Add support for multiple virtual host aliases
This patch includes a patch submitted to issue 26052. I may submit another
patch without that patch included if someone wants it.
--
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