From 89829a8fa9da5c344c4bf92a48113be234bdc155 Mon Sep 17 00:00:00 2001 From: saravanan_477at17 Date: Mon, 28 Feb 2022 17:25:16 +0530 Subject: [PATCH] Fixes #4383: Diagnose file changes added --- .htpassword | 1 + README.md | 6 ++++-- docker-scripts/nginx.conf | 10 ++++++++++ restyaboard.conf | 10 ++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .htpassword diff --git a/.htpassword b/.htpassword new file mode 100644 index 000000000..358f7914a --- /dev/null +++ b/.htpassword @@ -0,0 +1 @@ +restya:$apr1$DQIHRX5N$5N4aWaY7ozpbjsf.NAnR3. \ No newline at end of file diff --git a/README.md b/README.md index d35296096..2912cc830 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,10 @@ sudo ./restyaboard.sh * To add/reply cards via email, visit `/#/settings/10` to configure IMAP settings ### Diagnose Configuration -* You can check the status of the Restyaboard in the diagnose and you can access the diagnose page using username `restya`, password `restya123` -* You can also configure the different password for the diagnose page by following the instructions from the link https://www.php.net/manual/en/features.http-auth.php +* You can enable the password authentication for the diagnose page by uncommenting the lines 45-53 on the Nginx configuration file [restyaboard.conf](https://github.com/RestyaPlatform/board/blob/dev/restyaboard.conf#L45) +* You can check the status of the Restyaboard in the diagnose and you can access the diagnose page using the username `restya`, password `restya123` +* You can also configure the different password in the Nginx server configuration for the diagnose page by following the instructions from the link https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/ +* You can also configure the different password in the Nginx server configuration for the diagnose page by following the instructions from the link https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/ ### Forum diff --git a/docker-scripts/nginx.conf b/docker-scripts/nginx.conf index 7f048a0aa..b3dfc6f5e 100644 --- a/docker-scripts/nginx.conf +++ b/docker-scripts/nginx.conf @@ -42,6 +42,16 @@ server { fastcgi_param PHP_VALUE "upload_max_filesize=9G \n post_max_size=9G \n max_execution_time=200 \n max_input_time=200 \n memory_limit=256M"; } + # location /diagnose.php { + # auth_basic "Restricted Area"; + # auth_basic_user_file /var/lib/nginx/html/.htpasswd; + # try_files $uri =404; + # include fastcgi_params; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + # } + location ~* \.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico|pdf|doc|docx|xls|xlx|txt|ppt|pptx|mp4|webm|mkv|wmv|avi|mp3) { root /var/lib/nginx/html/client; if (-f $request_filename) { diff --git a/restyaboard.conf b/restyaboard.conf index 8f3ed0e0f..0fad73da6 100644 --- a/restyaboard.conf +++ b/restyaboard.conf @@ -42,6 +42,16 @@ server { fastcgi_param PHP_VALUE "upload_max_filesize=9G \n post_max_size=9G \n max_execution_time=200 \n max_input_time=200 \n memory_limit=256M"; } + # location /diagnose.php { + # auth_basic "Restricted Area"; + # auth_basic_user_file /usr/share/nginx/html/.htpasswd; + # try_files $uri =404; + # include fastcgi_params; + # fastcgi_pass unix:/run/php/php7.4-fpm.sock; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + # } + location ~* \.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico|pdf|doc|docx|xls|xlx|txt|ppt|pptx|mp4|webm|mkv|wmv|avi|mp3) { root /usr/share/nginx/html/client; if (-f $request_filename) {