Serve Web site content
Add an Apache virtual host serving the content from /var/lib/ptgbot/www over plain HTTP, with a configurable DNS name. Change-Id: Idb1fc5273b67ab88e1c78578275969b04c781c7a
This commit is contained in:
parent
7449a8db0d
commit
6f726c3088
|
@ -4,6 +4,7 @@ class ptgbot(
|
|||
$nick,
|
||||
$password,
|
||||
$channel,
|
||||
$vhost_name,
|
||||
) {
|
||||
|
||||
user { 'ptgbot':
|
||||
|
@ -132,6 +133,15 @@ class ptgbot(
|
|||
replace => true,
|
||||
require => User['ptgbot'],
|
||||
}
|
||||
|
||||
::httpd::vhost { $vhost_name:
|
||||
port => 80,
|
||||
docroot => '/var/lib/ptgbot/www',
|
||||
priority => '50',
|
||||
template => 'ptgbot/vhost.erb',
|
||||
require => File['/var/lib/ptgbot/www'],
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# ************************************
|
||||
# Managed by Puppet
|
||||
# ************************************
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName <%= @vhost_name %>
|
||||
DocumentRoot <%= @docroot %>
|
||||
<Directory <%= @docroot %>>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Satisfy Any
|
||||
Require all granted
|
||||
</Directory>
|
||||
LogLevel warn
|
||||
ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
|
||||
CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined
|
||||
ServerSignature Off
|
||||
</VirtualHost>
|
Loading…
Reference in New Issue