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:
|
# $wiki_datadir:
|
||||||
# Directory for wiki data. Defaults to /srv/wikis.
|
# Directory for wiki data. Defaults to /srv/wikis.
|
||||||
#
|
#
|
||||||
# $wiki_collab_fqdn:
|
# $collab_webhosts:
|
||||||
# FQDN of collab virtual host. Defaults to $homename.
|
# List of collab virtual hosts. Defaults to [ "$homename" ].
|
||||||
#
|
#
|
||||||
# $wiki_collab_jabberdomain:
|
# $collab_jabberdomain:
|
||||||
# Domain for jabber extauth.
|
# Domain for jabber extauth.
|
||||||
#
|
#
|
||||||
# $wiki_collab_conferencedomain:
|
# $collab_conferencedomain:
|
||||||
# Conference domain for jabber extauth.
|
# Conference domain for jabber extauth.
|
||||||
# Defaults to conference.$wiki_collab_jabberdomain.
|
# Defaults to conference.$wiki_collab_jabberdomain.
|
||||||
#
|
#
|
||||||
|
@ -235,8 +235,8 @@ class wiki::collab::base {
|
||||||
group => root,
|
group => root,
|
||||||
}
|
}
|
||||||
|
|
||||||
if $wiki_collab_jabberdomain and !$wiki_collab_conferencedomain {
|
if $collab_jabberdomain and !$collab_conferencedomain {
|
||||||
$wiki_collab_conferencedomain = "conference.${wiki_collab_jabberdomain}"
|
$collab_conferencedomain = "conference.${collab_jabberdomain}"
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/local/collab/collab.ini":
|
file { "/etc/local/collab/collab.ini":
|
||||||
|
@ -252,24 +252,9 @@ class wiki::collab::base {
|
||||||
$wiki_collab_fqdn = $homename
|
$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":
|
apache::configfile { "collab.conf":
|
||||||
content => template("wiki/collab-httpd.conf.erb"),
|
|
||||||
http => false,
|
http => false,
|
||||||
|
source => "puppet:///modules/wiki/collab-httpd.conf",
|
||||||
}
|
}
|
||||||
|
|
||||||
cron { "collab-htaccess":
|
cron { "collab-htaccess":
|
||||||
|
@ -282,4 +267,27 @@ class wiki::collab::base {
|
||||||
require => [ Class["wiki::collab"], File["/srv/wikis/collab/htdocs/.htaccess"], ]
|
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
|
helperuser=collab
|
||||||
## for collab-auth-ejabberd
|
## for collab-auth-ejabberd
|
||||||
cacherefreshtime=30
|
cacherefreshtime=30
|
||||||
<% if has_variable?("wiki_collab_jabberdomain") -%>
|
<% if has_variable?("collab_jabberdomain") -%>
|
||||||
[jabber]
|
[jabber]
|
||||||
## also in ejabberd.cfg
|
## also in ejabberd.cfg
|
||||||
jabberdomain=<%= wiki_collab_jabberdomain %>
|
jabberdomain=<%= collab_jabberdomain %>
|
||||||
conferencedomain=<%= wiki_collab_conferencedomain %>
|
conferencedomain=<%= collab_conferencedomain %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
Loading…
Add table
Reference in a new issue