From 3f4b1e69c78359384a0ad84e67627f5a8f2b18f9 Mon Sep 17 00:00:00 2001 From: Chiedo Date: Tue, 7 Mar 2017 14:28:38 -0500 Subject: [PATCH] Requested improvements - Moved the template files - Replaced . with $PWD - Made more descriptive errors in the templates --- plugins/nginx-vhosts/install | 8 ++++---- plugins/nginx-vhosts/templates/400-error.html | 2 +- plugins/nginx-vhosts/templates/404-error.html | 2 +- plugins/nginx-vhosts/templates/500-error.html | 2 +- plugins/nginx-vhosts/templates/nginx.conf.sigil | 12 ++++++------ 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/nginx-vhosts/install b/plugins/nginx-vhosts/install index 0254b02f4..d71b7803a 100755 --- a/plugins/nginx-vhosts/install +++ b/plugins/nginx-vhosts/install @@ -53,10 +53,10 @@ gpasswd -M "" dokku [[ -f /etc/logrotate.d/nginx ]] && sed -i -e 's/create 0640 www-data dokku/create 0640 www-data adm/g' /etc/logrotate.d/nginx # Create nginx error templates -sudo mkdir -p /etc/nginx/dokku-errors -sudo cp ./templates/400-error.html /etc/nginx/dokku-errors/400-error.html -sudo cp ./templates/404-error.html /etc/nginx/dokku-errors/404-error.html -sudo cp ./templates/500-error.html /etc/nginx/dokku-errors/500-error.html +sudo mkdir -p $DOKKU_LIB_ROOT/data/nginx-vhosts/dokku-errors +sudo cp $PWD/templates/400-error.html $DOKKU_LIB_ROOT/data/nginx-vhosts/dokku-errors/400-error.html +sudo cp $PWD/templates/404-error.html $DOKKU_LIB_ROOT/data/nginx-vhosts/dokku-errors/404-error.html +sudo cp $PWD/templates/500-error.html $DOKKU_LIB_ROOT/data/nginx-vhosts/dokku-errors/500-error.html # patch broken nginx 1.8.0 logrotate diff --git a/plugins/nginx-vhosts/templates/400-error.html b/plugins/nginx-vhosts/templates/400-error.html index 223aa802b..f3353b09f 100644 --- a/plugins/nginx-vhosts/templates/400-error.html +++ b/plugins/nginx-vhosts/templates/400-error.html @@ -2,7 +2,7 @@
-

THERE HAS BEEN AN ERROR.

+

THERE HAS BEEN A 400 ERROR.

diff --git a/plugins/nginx-vhosts/templates/404-error.html b/plugins/nginx-vhosts/templates/404-error.html index 474df07fd..65b300366 100644 --- a/plugins/nginx-vhosts/templates/404-error.html +++ b/plugins/nginx-vhosts/templates/404-error.html @@ -2,7 +2,7 @@
-

404. NOT FOUND.

+

THERE HAS BEEN A 404 ERROR.

diff --git a/plugins/nginx-vhosts/templates/500-error.html b/plugins/nginx-vhosts/templates/500-error.html index 223aa802b..daf96605b 100644 --- a/plugins/nginx-vhosts/templates/500-error.html +++ b/plugins/nginx-vhosts/templates/500-error.html @@ -2,7 +2,7 @@
-

THERE HAS BEEN AN ERROR.

+

THERE HAS BEEN A 500 ERROR.

diff --git a/plugins/nginx-vhosts/templates/nginx.conf.sigil b/plugins/nginx-vhosts/templates/nginx.conf.sigil index 57e737370..37451d304 100644 --- a/plugins/nginx-vhosts/templates/nginx.conf.sigil +++ b/plugins/nginx-vhosts/templates/nginx.conf.sigil @@ -37,19 +37,19 @@ server { error_page 400 401 402 403 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 /400-error.html; location /400-error.html { - root /etc/nginx/dokku-errors; + root $DOKKU_LIB_ROOT/data/nginx-vhosts/dokku-errors; internal; } error_page 404 /404-error.html; location /404-error.html { - root /etc/nginx/dokku-errors; + root $DOKKU_LIB_ROOT/data/nginx-vhosts/dokku-errors; internal; } error_page 500 501 502 503 504 505 506 507 508 509 510 511 /500-error.html; location /500-error.html { - root /etc/nginx/dokku-errors; + root $DOKKU_LIB_ROOT/data/nginx-vhosts/dokku-errors; internal; } {{ end }} @@ -93,19 +93,19 @@ server { error_page 400 401 402 403 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 /400-error.html; location /400-error.html { - root /etc/nginx/dokku-errors; + root $DOKKU_LIB_ROOT/data/nginx-vhosts/dokku-errors; internal; } error_page 404 /404-error.html; location /404-error.html { - root /etc/nginx/dokku-errors; + root $DOKKU_LIB_ROOT/data/nginx-vhosts/dokku-errors; internal; } error_page 500 501 502 503 504 505 506 507 508 509 510 511 /500-error.html; location /500-error.html { - root /etc/nginx/dokku-errors; + root $DOKKU_LIB_ROOT/data/nginx-vhosts/dokku-errors; internal; } }