Added support for multiple collab virtualhosts
This commit is contained in:
parent
0f87959499
commit
4855c4111e
4 changed files with 38 additions and 30 deletions
4
wiki/files/collab-httpd.conf
Normal file
4
wiki/files/collab-httpd.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
<Directory "/srv/www/https/*/collab">
|
||||
Options +ExecCGI
|
||||
AllowOverride All
|
||||
</Directory>
|
|
@ -95,13 +95,13 @@ class wiki::collab inherits wiki::graphingwiki::common {
|
|||
# $wiki_datadir:
|
||||
# Directory for wiki data. Defaults to /srv/wikis.
|
||||
#
|
||||
# $wiki_collab_fqdn:
|
||||
# FQDN of collab virtual host. Defaults to $homename.
|
||||
# $collab_webhosts:
|
||||
# List of collab virtual hosts. Defaults to [ "$homename" ].
|
||||
#
|
||||
# $wiki_collab_jabberdomain:
|
||||
# $collab_jabberdomain:
|
||||
# Domain for jabber extauth.
|
||||
#
|
||||
# $wiki_collab_conferencedomain:
|
||||
# $collab_conferencedomain:
|
||||
# Conference domain for jabber extauth.
|
||||
# Defaults to conference.$wiki_collab_jabberdomain.
|
||||
#
|
||||
|
@ -235,8 +235,8 @@ class wiki::collab::base {
|
|||
group => root,
|
||||
}
|
||||
|
||||
if $wiki_collab_jabberdomain and !$wiki_collab_conferencedomain {
|
||||
$wiki_collab_conferencedomain = "conference.${wiki_collab_jabberdomain}"
|
||||
if $collab_jabberdomain and !$collab_conferencedomain {
|
||||
$collab_conferencedomain = "conference.${collab_jabberdomain}"
|
||||
}
|
||||
|
||||
file { "/etc/local/collab/collab.ini":
|
||||
|
@ -252,24 +252,9 @@ class wiki::collab::base {
|
|||
$wiki_collab_fqdn = $homename
|
||||
}
|
||||
|
||||
file { "/srv/www/https/${wiki_collab_fqdn}/collab":
|
||||
ensure => link,
|
||||
target => "/srv/wikis/collab/htdocs",
|
||||
require => File["/srv/www/https/${wiki_collab_fqdn}"],
|
||||
}
|
||||
|
||||
file { "/srv/www/https/${wiki_collab_fqdn}/moin_static":
|
||||
ensure => link,
|
||||
target => $operatingsystem ? {
|
||||
ubuntu => "/usr/local/share/moin/htdocs",
|
||||
default => "/usr/share/moin/htdocs",
|
||||
},
|
||||
require => File["/srv/www/https/${wiki_collab_fqdn}"],
|
||||
}
|
||||
|
||||
apache::configfile { "collab.conf":
|
||||
content => template("wiki/collab-httpd.conf.erb"),
|
||||
http => false,
|
||||
source => "puppet:///modules/wiki/collab-httpd.conf",
|
||||
}
|
||||
|
||||
cron { "collab-htaccess":
|
||||
|
@ -282,4 +267,27 @@ class wiki::collab::base {
|
|||
require => [ Class["wiki::collab"], File["/srv/wikis/collab/htdocs/.htaccess"], ]
|
||||
}
|
||||
|
||||
define configwebhost() {
|
||||
file { "/srv/www/https/${name}/collab":
|
||||
ensure => link,
|
||||
target => "/srv/wikis/collab/htdocs",
|
||||
require => File["/srv/www/https/${name}"],
|
||||
}
|
||||
|
||||
file { "/srv/www/https/${name}/moin_static":
|
||||
ensure => link,
|
||||
target => $operatingsystem ? {
|
||||
ubuntu => "/usr/local/share/moin/htdocs",
|
||||
default => "/usr/share/moin/htdocs",
|
||||
},
|
||||
require => File["/srv/www/https/${name}"],
|
||||
}
|
||||
}
|
||||
|
||||
if !$collab_webhosts {
|
||||
$collab_webhosts = [ "${homename}" ]
|
||||
}
|
||||
|
||||
configwebhost { $collab_webhosts: }
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<Directory "/srv/www/https/<%= wiki_collab_fqdn %>/collab">
|
||||
Options +ExecCGI
|
||||
AllowOverride All
|
||||
</Directory>
|
|
@ -17,9 +17,9 @@ piddir=/srv/wikis/collab/run
|
|||
helperuser=collab
|
||||
## for collab-auth-ejabberd
|
||||
cacherefreshtime=30
|
||||
<% if has_variable?("wiki_collab_jabberdomain") -%>
|
||||
<% if has_variable?("collab_jabberdomain") -%>
|
||||
[jabber]
|
||||
## also in ejabberd.cfg
|
||||
jabberdomain=<%= wiki_collab_jabberdomain %>
|
||||
conferencedomain=<%= wiki_collab_conferencedomain %>
|
||||
jabberdomain=<%= collab_jabberdomain %>
|
||||
conferencedomain=<%= collab_conferencedomain %>
|
||||
<% end -%>
|
||||
|
|
Loading…
Add table
Reference in a new issue