Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#128: Include HTTP 400 error in virtualhost #384

Merged
merged 4 commits into from
Feb 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 84 additions & 54 deletions puppet/environment/development/manifests/configure_httpd.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## variables: non-ssl
$port = '80'
$port = '80'

## variables: ssl
$ssl_dir = '/etc/ssl/httpd'
Expand Down Expand Up @@ -68,91 +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' => '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',
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion puppet/environment/development/template/webcompilers.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down