Serve IRC log files as MIME type text/plain.
* modules/meetbot/manifests/site.pp: Specify a nondefault vhost template. * modules/meetbot/templates/vhost.erb: New file, similar in content to the default puppetlabs-apache vhost template but forcing MIME type text/plain and a default encoding of UTF-8 for files ending in a .log suffix. Change-Id: Ief0253c2baac32b126472d0f97f0aa503adbbd7f
This commit is contained in:
parent
9d7fab89c8
commit
67b91c1606
@ -15,6 +15,7 @@ define meetbot::site(
|
||||
port => 80,
|
||||
docroot => "/srv/meetbot-${name}",
|
||||
priority => '50',
|
||||
template => 'meetbot/vhost.erb',
|
||||
}
|
||||
|
||||
file { $varlib:
|
||||
|
29
modules/meetbot/templates/vhost.erb
Normal file
29
modules/meetbot/templates/vhost.erb
Normal file
@ -0,0 +1,29 @@
|
||||
# ************************************
|
||||
# Managed by Puppet
|
||||
# ************************************
|
||||
|
||||
NameVirtualHost <%= vhost_name %>:<%= port %>
|
||||
<VirtualHost <%= vhost_name %>:<%= port %>>
|
||||
ServerName <%= srvname %>
|
||||
<% if serveraliases.is_a? Array -%>
|
||||
<% serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
|
||||
<% elsif serveraliases != '' -%>
|
||||
<%= " ServerAlias #{serveraliases}" %>
|
||||
<% end -%>
|
||||
DocumentRoot <%= docroot %>
|
||||
<FilesMatch \.log$>
|
||||
ForceType text/plain
|
||||
AddDefaultCharset UTF-8
|
||||
</FilesMatch>
|
||||
<Directory <%= docroot %>>
|
||||
Options <%= options %>
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</Directory>
|
||||
|
||||
ErrorLog /var/log/apache2/<%= name %>_error.log
|
||||
LogLevel warn
|
||||
CustomLog /var/log/apache2/<%= name %>_access.log combined
|
||||
ServerSignature Off
|
||||
</VirtualHost>
|
Loading…
x
Reference in New Issue
Block a user