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 40441] New: - intelligently handling dynamic subdomains
Date Fri, 08 Sep 2006 06:52:33 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40441>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40441

           Summary: intelligently handling dynamic subdomains
           Product: Apache httpd-2
           Version: 2.2-HEAD
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_vhost_alias
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: apache@studio1.com.au


The current mod_vhost_alias does not intelligently handle 'www.'. A simple example:

Request: www.example.com  
Config: VirtualDocumentRoot /webhome/%1.1/%0
Result: /webhome/w/www.example.com

Request: example.com  
Config: VirtualDocumentRoot /webhome/%1.1/%0
Result: /webhome/e/example.com

A messy example, involving *wildcard* dns subdomains.

Request: testing.example.com  
Config: VirtualDocumentRoot /webhome/%1.1/%0
Result: /webhome/t/testing.example.com

The common solution has been to create symlinks. Eg, between e/example.com and
w/www.example.com. This is a crude solution due to requiring additional symlink
lookups and manual or scripted maintenance of such symlinks - which we'd all
agree is messy.

Attached is a patch that allows you to use a flag called 'VirtualStripWWW' to
allow mod_vhost_alias to strip any occurences of 'www.'. The default is 'on' -
probably a topic of discussion. 

The result is you do not need to have symlinks to maintain subdomains. 

The patch also allows for the scenario where you have configured dynamic
subdomains for a given domain and are required to show content from a directory
correlating to the subdomain. Simply use a seperate virtualhost for the domain,
and whatever servername you use it will not be stripped, which is very useful
when you may want to keep the 'www' (eg if you have public/www,
public/othersubdomain, public/yetanothersubdomain).

Hopefully people find it useful.

Regards,
Mark

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

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


Mime
View raw message