From 773d05245b79671bfe4c442e08d268f72814bc15 Mon Sep 17 00:00:00 2001 From: jeff levesque Date: Sun, 28 Feb 2016 20:48:10 -0500 Subject: [PATCH 1/3] #128: configure_httpd.pp, add 302 error code case --- puppet/environment/development/manifests/configure_httpd.pp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/puppet/environment/development/manifests/configure_httpd.pp b/puppet/environment/development/manifests/configure_httpd.pp index 49843264..4722ad8c 100644 --- a/puppet/environment/development/manifests/configure_httpd.pp +++ b/puppet/environment/development/manifests/configure_httpd.pp @@ -93,6 +93,9 @@ require => 'all granted', options => ['Indexes', 'FollowSymLinks'], error_documents => [ + { 'error_code' => '302', + 'document' => "${webroot}/error.php", + }, { 'error_code' => '401', 'document' => "${webroot}/error.php", }, From 3d4a89e84bba0424cbcf0cd61fa1697ea046d144 Mon Sep 17 00:00:00 2001 From: jeff levesque Date: Mon, 29 Feb 2016 13:21:07 -0500 Subject: [PATCH 2/3] #128: webcompilers.erb minor language change --- puppet/environment/development/template/webcompilers.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/puppet/environment/development/template/webcompilers.erb b/puppet/environment/development/template/webcompilers.erb index e198f00c..fd7807ec 100644 --- a/puppet/environment/development/template/webcompilers.erb +++ b/puppet/environment/development/template/webcompilers.erb @@ -19,7 +19,7 @@ RequiresMountsFor=/vagrant # @User (optional), run service as specified user. # @Restart (optional), restart service, when the service process exits, is # killed, or a timeout is reached. This has been removed since, an error -# stated this service has started to quickly. +# stated this service has started too quickly. # @ExecStart (optional), command to run when the unit is started. [Service] Type=simple From a6b37ba6a3f62b24133effc61586d69e73ea86cc Mon Sep 17 00:00:00 2001 From: jeff levesque Date: Mon, 29 Feb 2016 17:57:04 -0500 Subject: [PATCH 3/3] #128: configure_httpd.pp, adjust indentation, ensure errordocument --- .../development/manifests/configure_httpd.pp | 141 +++++++++++------- 1 file changed, 84 insertions(+), 57 deletions(-) diff --git a/puppet/environment/development/manifests/configure_httpd.pp b/puppet/environment/development/manifests/configure_httpd.pp index 22793bc0..65d5789a 100644 --- a/puppet/environment/development/manifests/configure_httpd.pp +++ b/puppet/environment/development/manifests/configure_httpd.pp @@ -1,5 +1,5 @@ ## variables: non-ssl -$port = '80' +$port = '80' ## variables: ssl $ssl_dir = '/etc/ssl/httpd' @@ -68,94 +68,121 @@ # within 'ports.conf', which would conflict with similar directive, # found in 'ssl.conf' apache::vhost { "${vhost_name}_ssl": - servername => $vhost_name, - port => $port_ssl, - add_listen => false, - docroot => $webroot, - ssl => true, - ssl_cert => "${ssl_dir}/httpd.crt", - ssl_key => "${ssl_dir}/httpd.key", + servername => $vhost_name, + port => $port_ssl, + add_listen => false, + docroot => $webroot, + ssl => true, + ssl_cert => "${ssl_dir}/httpd.crt", + ssl_key => "${ssl_dir}/httpd.key", + error_documents => [ + { + 'error_code' => '400', + 'document' => 'error.php', + }, + ], directories => [ - { path => '/', + { + path => '/', provider => 'directory', allowoverride => 'None', require => 'all denied', }, - { path => $webroot, + { + path => $webroot, provider => 'directory', allowoverride => 'All', require => 'all granted', options => ['Indexes', 'FollowSymLinks'], error_documents => [ - { 'error_code' => '302', - 'document' => "${webroot}/error.php", - }, - { 'error_code' => '401', - 'document' => "${webroot}/error.php", + { + 'error_code' => '401', + 'document' => 'error.php', }, - { 'error_code' => '402', - 'document' => "${webroot}/error.php", + { + 'error_code' => '402', + 'document' => 'error.php', }, - { 'error_code' => '403', - 'document' => "${webroot}/error.php", + { + 'error_code' => '403', + 'document' => 'error.php', }, - { 'error_code' => '404', - 'document' => "${webroot}/error.php", + { + 'error_code' => '404', + 'document' => 'error.php', }, - { 'error_code' => '405', - 'document' => "${webroot}/error.php", + { + 'error_code' => '405', + 'document' => 'error.php', }, - { 'error_code' => '406', - 'document' => "${webroot}/error.php", + { + 'error_code' => '406', + 'document' => 'error.php', }, - { 'error_code' => '407', - 'document' => "${webroot}/error.php", + { + 'error_code' => '407', + 'document' => 'error.php', }, - { 'error_code' => '408', - 'document' => "${webroot}/error.php", + { + 'error_code' => '408', + 'document' => 'error.php', }, - { 'error_code' => '409', - 'document' => "${webroot}/error.php", + { + 'error_code' => '409', + 'document' => 'error.php', }, - { 'error_code' => '411', - 'document' => "${webroot}/error.php", + { + 'error_code' => '411', + 'document' => 'error.php', }, - { 'error_code' => '412', - 'document' => "${webroot}/error.php", + { + 'error_code' => '412', + 'document' => 'error.php', }, - { 'error_code' => '413', - 'document' => "${webroot}/error.php", + { + 'error_code' => '413', + 'document' => 'error.php', }, - { 'error_code' => '414', - 'document' => "${webroot}/error.php", + { + 'error_code' => '414', + 'document' => 'error.php', }, - { 'error_code' => '415', - 'document' => "${webroot}/error.php", + { + 'error_code' => '415', + 'document' => 'error.php', }, - { 'error_code' => '416', - 'document' => "${webroot}/error.php", + { + 'error_code' => '416', + 'document' => 'error.php', }, - { 'error_code' => '417', - 'document' => "${webroot}/error.php", + { + 'error_code' => '417', + 'document' => 'error.php', }, - { 'error_code' => '500', - 'document' => "${webroot}/error.php", + { + 'error_code' => '500', + 'document' => 'error.php', }, - { 'error_code' => '501', - 'document' => "${webroot}/error.php", + { + 'error_code' => '501', + 'document' => 'error.php', }, - { 'error_code' => '502', - 'document' => "${webroot}/error.php", + { + 'error_code' => '502', + 'document' => 'error.php', }, - { 'error_code' => '503', - 'document' => "${webroot}/error.php", + { + 'error_code' => '503', + 'document' => 'error.php', }, - { 'error_code' => '504', - 'document' => "${webroot}/error.php", + { + 'error_code' => '504', + 'document' => 'error.php', }, - { 'error_code' => '505', - 'document' => "${webroot}/error.php", + { + 'error_code' => '505', + 'document' => 'error.php', }, ], },