开发者

Apache addon perl script for obtaining subdomain from a wildcard

开发者 https://www.devze.com 2023-02-22 05:45 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消