Added support for ejabberd web interface
This commit is contained in:
parent
4855c4111e
commit
e98a929347
4 changed files with 40 additions and 1 deletions
3
ejabberd/files/ejabberd-httpd.conf
Normal file
3
ejabberd/files/ejabberd-httpd.conf
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<Directory "/srv/www/https/*/jabber">
|
||||||
|
AllowOverride All
|
||||||
|
</Directory>
|
4
ejabberd/files/htaccess
Normal file
4
ejabberd/files/htaccess
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteRule ^(.*)$ http://localhost:5280/$1 [P]
|
||||||
|
</IfModule>
|
|
@ -44,4 +44,36 @@ class ejabberd {
|
||||||
notify => Service["ejabberd"],
|
notify => Service["ejabberd"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $ejabberd_webhosts {
|
||||||
|
file { "/var/www/jabber":
|
||||||
|
ensure => directory,
|
||||||
|
mode => 0755,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "/var/www/jabber/.htaccess":
|
||||||
|
ensure => present,
|
||||||
|
mode => 0644,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
source => "puppet:///modules/ejabberd/htaccess",
|
||||||
|
require => File["/var/www/jabber"],
|
||||||
|
}
|
||||||
|
|
||||||
|
apache::configfile { "ejabberd.conf":
|
||||||
|
http => false,
|
||||||
|
source => "puppet:///modules/ejabberd/ejabberd-httpd.conf",
|
||||||
|
}
|
||||||
|
|
||||||
|
define configwebhost() {
|
||||||
|
file { "/srv/www/https/${name}/jabber":
|
||||||
|
ensure => link,
|
||||||
|
target => "/var/www/jabber",
|
||||||
|
require => File["/srv/www/https/${name}"],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configwebhost { $ejabberd_webhosts: }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,7 +249,7 @@ override_acls.
|
||||||
%% If you want to use a different method,
|
%% If you want to use a different method,
|
||||||
%% comment this line and enable the correct ones.
|
%% comment this line and enable the correct ones.
|
||||||
%%
|
%%
|
||||||
<% if ejabberd_extauth -%>
|
<% if has_variable?("ejabberd_extauth") -%>
|
||||||
{auth_method, external}.
|
{auth_method, external}.
|
||||||
{extauth_program, "<%= ejabberd_extauth %>"}.
|
{extauth_program, "<%= ejabberd_extauth %>"}.
|
||||||
<% else -%>
|
<% else -%>
|
||||||
|
|
Loading…
Add table
Reference in a new issue