Added initial apache configs for vsroom
This commit is contained in:
parent
e98a929347
commit
760dc96f06
3 changed files with 53 additions and 0 deletions
4
vsroom/files/htaccess
Normal file
4
vsroom/files/htaccess
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
AuthType Basic
|
||||||
|
AuthName "VSRoom"
|
||||||
|
AuthUserFile /var/lib/vsroom/.htpasswd
|
||||||
|
Require valid-user
|
3
vsroom/files/vsroom-httpd.conf
Normal file
3
vsroom/files/vsroom-httpd.conf
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<Directory "/srv/www/https/*/vsroom">
|
||||||
|
AllowOverride All
|
||||||
|
</Directory>
|
|
@ -78,4 +78,50 @@ class vsroom {
|
||||||
require => File["/var/lib/vsroom"],
|
require => File["/var/lib/vsroom"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { "/var/www/vsroom":
|
||||||
|
ensure => directory,
|
||||||
|
mode => 0755,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "/var/www/vsroom/.htaccess":
|
||||||
|
ensure => present,
|
||||||
|
mode => 0644,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
source => "puppet:///modules/vsroom/htaccess",
|
||||||
|
replace => false,
|
||||||
|
require => File["/var/www/vsroom"],
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "/var/www/vsroom/config.json":
|
||||||
|
ensure => present,
|
||||||
|
mode => 0644,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
content => "{ \"boshUrl\": \"/jabber/http-bind/\" }\n",
|
||||||
|
replace => false,
|
||||||
|
require => File["/var/www/vsroom"],
|
||||||
|
}
|
||||||
|
|
||||||
|
apache::configfile { "vsroom.conf":
|
||||||
|
http => false,
|
||||||
|
source => "puppet:///modules/vsroom/vsroom-httpd.conf",
|
||||||
|
}
|
||||||
|
|
||||||
|
define configwebhost() {
|
||||||
|
file { "/srv/www/https/${name}/vsroom":
|
||||||
|
ensure => link,
|
||||||
|
target => "/var/www/vsroom",
|
||||||
|
require => File["/srv/www/https/${name}"],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if !$vsroom_webhosts {
|
||||||
|
$vsroom_webhosts = [ "${homename}" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
configwebhost { $vsroom_webhosts: }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue