Apache addon perl script for obtaining subdomain from a wildcard
I had an issue regarding this which I've manage to fix to this stage, but the only issue is finding out how this could be achieved by perl.
This is a current structure of a link:
http://username.mydomain.com/public/name
And this is the current VirtualHost I've got:
<VirtualHost *:80>
ServerName mydomain.com
ServerAlias *.mydomain.com
<Location /public>
DAV svn
SVNParentPath /home/svn/public/{SubdomainHere}
</Location>
ErrorLog /home/svn/log/error.log
CustomLog /home/svn/log/warning.log combined
</VirtualHost>
The above shows the current VirtualHost structure, and where the subdomain pattern is required. I've looked into the mod_perl and enabled it, and also understand now I can just add the tags. However, my perl skills are limited if not none existant.
I've seen the answer here and I believe it's somewhat similar to mine but requiring more mods: https://serverfault.com/questions/85256/using-url-within-vhost-container-with-mod-perl-dynamically
开发者_开发问答Could someone show me how this could be achieved and/or point me in the right direction?
Many thanks, Shaun
I overcame this by creating a C++ init script which auto added the config files then reloaded apache2
精彩评论