Hi thf,
I have successfully written a custom template which creates a subdomain for my TRAC projects.
I had to use your virtual host template
29TracProjects as a reference because the httpd entry changes whenever a group or user is added/removed.
Anyway, my template looks for a special prefix string "
trac_sd_" in the trac project name to determine whether it should have a subdomain created or not.
The template creates a subdomain of the type:
trac.project.domainNote: The prefix can be changed, it is set on line 11, $trac_subdomain_identifier = "trac_sd_".
So, for a project named:
trac_sd_project1which is visible on the domain:
mydomain.comthe following subdomain will be created:
trac.project1.mydomain.comI developed this template in the hopes that you might consider integrating something similar in a future realease of the trac contrib.
I think you will only need two new settings:
- a tickbox
Create subdomain [ ] (y/n).
- a string
project name [ ] (eg. project1 for trac.project1.domain).
I'm still very uncertain about the subdomains on this server though so I don't know if what I'm proposing will cause problems.
Should the
project1 subdomain (and the
trac.project1 subdomain) be added to the subdomains list or not?
Perhaps the project name could/should be a pull down list of configured subdomains.
I've checked the forum & manual for subdomain setup information but it doesn't say much on how to point the subdomain to somewhere else on the server without suggesting a custom template.
I also don't know much about apache, so the security & redirect commands may need to be changed. Currently I redirect all port 80 traffic to 443 & require SSL.
Anyway, if your interested in my template you can download it from
here, it needs to be placed in the
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf directory.
I've also developed a custom template that generates both a trac & svn subdomain.
Because the svn contrib doesn't include the domains option this template uses the trac domains for both.
It can be downloaded
here.
Sorry about the marathon post.
I am happy using my custom template but I feel that the trac contrib (and the svn contrib) would be even better with the subdomain options.
Thanks
Blacknz
PS: Should this be put into bugzilla as a feature request (for both the trac & svn contribs) or is the forum a more appropriate place for this?