From 125e1d95edf71a6c8ac7b14348dc26eccd2a7a97 Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Tue, 1 Dec 2015 17:57:44 +0100 Subject: bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - backup nginx configuration before patch it - apache/nginx « application/jose+json » to « text/plain » --- README.md | 2 ++ apache.letsencrypt.conf | 2 +- install.php | 2 ++ nginx.conf.patch | 6 +++--- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c16ac1d..80e78e6 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ After install, a new checkbox will be available in editing website, just check i ## MANUAL INSTALLATION +- make your own backup! + - go to dir ``` cd ISPConfig-letsencrypt diff --git a/apache.letsencrypt.conf b/apache.letsencrypt.conf index 43ab897..9b78347 100644 --- a/apache.letsencrypt.conf +++ b/apache.letsencrypt.conf @@ -1,5 +1,5 @@ - Header set Content-Type "application/jose+json" + Header set Content-Type "text/plain" \ No newline at end of file diff --git a/install.php b/install.php index 58ca699..73d60f9 100644 --- a/install.php +++ b/install.php @@ -112,6 +112,8 @@ if(is_file("/etc/apache2/apache2.conf")) { } if(is_file("/etc/nginx/nginx.conf")) { + echo "Backup Nginx file to " . $backup_dir . ".\n"; + exec("cp /etc/nginx/nginx.conf " . $backup_dir . date("Ymdhis") . "-nginx.conf"; ); echo "Patch Nginx and reload it.\n"; exec("patch /etc/nginx/nginx.conf < ./nginx.conf.patch"); exec("service nginx reload"); diff --git a/nginx.conf.patch b/nginx.conf.patch index b49364b..63a7d62 100644 --- a/nginx.conf.patch +++ b/nginx.conf.patch @@ -1,12 +1,12 @@ ---- /etc/nginx/nginx.conf.orig 2015-11-08 01:44:42.558552834 +0100 -+++ /etc/nginx/nginx.conf 2015-11-08 02:10:51.275908452 +0100 +--- /etc/nginx/nginx.conf.orig 2015-11-08 02:10:51.275908452 +0100 ++++ /etc/nginx/nginx.conf 2015-12-01 17:52:11.275908452 +0100 @@ -9,6 +9,12 @@ http { + server { + location ~ /.well-known/acme-challenge/(.*) { -+ default_type application/jose+json; ++ default_type text/plain; + } + } + -- cgit v1.2.3