Runs now w/o errors

This commit is contained in:
7u83 2020-10-15 16:16:04 +02:00
parent 8772bacffb
commit 2270694130
2 changed files with 37 additions and 22 deletions

View File

@ -49,7 +49,7 @@ class wmdeit_piwik(
$localsql = true,
$piwikdbuser = "piwik",
$piwikdbpassword = "piwik",
$ssl = false,
) inherits wmdeit_piwik::params
{
@ -95,6 +95,15 @@ class wmdeit_piwik(
creates => "$wwwdir/piwik",
}
if $ssl {
$ssl_redirect = true
$ssl_port = 443
$ssl_key = "/etc/ssl/private/wikimedia.de.key"
$ssl_cert = "/etc/ssl/certs/wikimedia.de.chained.pem"
}
if $localnginx {
class {"nginx":
@ -106,28 +115,34 @@ class wmdeit_piwik(
}
nginx::resource::server { "${domain}_http":
listen_port => 80,
ensure => present,
access_log => "off",
error_log => "off",
server_name => ["$domain"],
server_cfg_append => {
"return" => '301 https://$server_name$request_uri'
}
}
# nginx::resource::server { "${domain}_http":
# listen_port => 80,
# ensure => present,
# access_log => "off",
# error_log => "off",
# server_name => ["$domain"],
# server_cfg_append => {
# "return" => '301 https://$server_name$request_uri'
# }
#
# }
nginx::resource::server { "$domain":
listen_port => 443,
ssl_redirect => $ssl,
ssl_port => $ssl_port,
ssl_key => $ssl_key,
ssl_cert => $ssl_cert,
server_name => ["$domain"],
# listen_port => 443,
ensure => present,
www_root => "$wwwdir/piwik",
access_log => "off",
error_log => "off",
ssl_cert => "$ssldir/certs/wikimedia.de.chained.pem",
ssl_key => "$ssldir/private/wikimedia.de.key",
ssl => true,
# ssl => true,
server_cfg_append => {
"ssl_session_cache" => "shared:SSL:10m",
# " ssl_session_timeout" => "10m;"
@ -146,8 +161,8 @@ class wmdeit_piwik(
nginx::resource::location { "${domain}_x2":
ensure => present,
server => "$domain",
ssl => true,
ssl_only => true,
# ssl => true,
# ssl_only => true,
www_root => "$wwwdir/piwik/",
location => '~* ^.+\.(?:css|gif|html?|jpe?g|js|png|swf)$',
location_cfg_append=> {
@ -164,8 +179,8 @@ class wmdeit_piwik(
nginx::resource::location { "${domain}_root":
ensure => present,
server => "$domain",
ssl => true,
ssl_only => true,
# ssl => true,
# ssl_only => true,
www_root => "$wwwdir/piwik/",
location => '~ \.php$',
index_files => ['index.php', 'index.html', 'index.htm'],

View File

@ -54,8 +54,8 @@ class wmdeit_piwik::params{
"$phpver-mysql",
"$phpver-mbstring",
"$phpver-gd",
"$phpver-dom",
"$phpver-simplexml",
# "$phpver-dom",
# "$phpver-simplexml",
]