From ed51dbfb43ea9170be82e2779df4c72299e0e797 Mon Sep 17 00:00:00 2001 From: saravanan_477at17 Date: Mon, 28 Feb 2022 12:52:37 +0530 Subject: [PATCH 1/9] Fixes #4383: Diagnose file changes added --- README.md | 4 ++++ diagnose.php | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 71f203ddd..d35296096 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,10 @@ sudo ./restyaboard.sh * Change admin email and password * 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 + ### Forum * [Restya Google Group](https://groups.google.com/d/forum/restya) diff --git a/diagnose.php b/diagnose.php index b326ff8c0..75c26c623 100755 --- a/diagnose.php +++ b/diagnose.php @@ -12,6 +12,12 @@ * @license http://restya.com/ Restya Licence * @link http://restya.com/ */ +if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_USER'] != 'restya' ||$_SERVER['PHP_AUTH_PW'] != 'restya123') { // https://www.php.net/manual/en/features.http-auth.php + header("WWW-Authenticate: Basic realm=\"Newsletter\""); + header("HTTP/1.0 401 Unauthorized"); + echo '

Rejected!

Wrong Username or Password!'; + exit; +} $nginx_class = true; exec("which nginx", $nginx_version); if (!empty($nginx_version[0])) { From c11e778eb4c23879e1e2ceb9e384e65f22b6bf54 Mon Sep 17 00:00:00 2001 From: saravanan_477at17 Date: Mon, 28 Feb 2022 16:05:36 +0530 Subject: [PATCH 2/9] Fixes #4383: Diagnose file changes added --- .htpasswd | 1 + diagnose.php | 6 ------ docker-scripts/nginx.conf | 10 ++++++++++ restyaboard.conf | 10 ++++++++++ 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 .htpasswd diff --git a/.htpasswd b/.htpasswd new file mode 100644 index 000000000..b9c2d859d --- /dev/null +++ b/.htpasswd @@ -0,0 +1 @@ +restya:$apr1$DQIHRX5N$5N4aWaY7ozpbjsf.NAnR3. diff --git a/diagnose.php b/diagnose.php index 75c26c623..b326ff8c0 100755 --- a/diagnose.php +++ b/diagnose.php @@ -12,12 +12,6 @@ * @license http://restya.com/ Restya Licence * @link http://restya.com/ */ -if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_USER'] != 'restya' ||$_SERVER['PHP_AUTH_PW'] != 'restya123') { // https://www.php.net/manual/en/features.http-auth.php - header("WWW-Authenticate: Basic realm=\"Newsletter\""); - header("HTTP/1.0 401 Unauthorized"); - echo '

Rejected!

Wrong Username or Password!'; - exit; -} $nginx_class = true; exec("which nginx", $nginx_version); if (!empty($nginx_version[0])) { diff --git a/docker-scripts/nginx.conf b/docker-scripts/nginx.conf index 7f048a0aa..32ce68a7e 100644 --- a/docker-scripts/nginx.conf +++ b/docker-scripts/nginx.conf @@ -33,6 +33,16 @@ server { deny all; } + 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 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + } + location ~ \.php$ { try_files $uri =404; include fastcgi_params; diff --git a/restyaboard.conf b/restyaboard.conf index 83621345e..73509462a 100644 --- a/restyaboard.conf +++ b/restyaboard.conf @@ -32,6 +32,16 @@ server { location ^~ /media { deny all; } + + 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 ~ \.php$ { try_files $uri =404; From 05137ee845b486cb1054ae3e97df88e975f31bcc Mon Sep 17 00:00:00 2001 From: saravanan_477at17 Date: Mon, 28 Feb 2022 16:47:09 +0530 Subject: [PATCH 3/9] Fixes #4383: Diagnose file changes added --- .htpasswd | 1 - diagnose.php | 6 ++++++ docker-scripts/nginx.conf | 10 ---------- restyaboard.conf | 10 ---------- 4 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 .htpasswd diff --git a/.htpasswd b/.htpasswd deleted file mode 100644 index b9c2d859d..000000000 --- a/.htpasswd +++ /dev/null @@ -1 +0,0 @@ -restya:$apr1$DQIHRX5N$5N4aWaY7ozpbjsf.NAnR3. diff --git a/diagnose.php b/diagnose.php index b326ff8c0..75c26c623 100755 --- a/diagnose.php +++ b/diagnose.php @@ -12,6 +12,12 @@ * @license http://restya.com/ Restya Licence * @link http://restya.com/ */ +if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_USER'] != 'restya' ||$_SERVER['PHP_AUTH_PW'] != 'restya123') { // https://www.php.net/manual/en/features.http-auth.php + header("WWW-Authenticate: Basic realm=\"Newsletter\""); + header("HTTP/1.0 401 Unauthorized"); + echo '

Rejected!

Wrong Username or Password!'; + exit; +} $nginx_class = true; exec("which nginx", $nginx_version); if (!empty($nginx_version[0])) { diff --git a/docker-scripts/nginx.conf b/docker-scripts/nginx.conf index 32ce68a7e..7f048a0aa 100644 --- a/docker-scripts/nginx.conf +++ b/docker-scripts/nginx.conf @@ -33,16 +33,6 @@ server { deny all; } - 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 127.0.0.1:9000; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - } - location ~ \.php$ { try_files $uri =404; include fastcgi_params; diff --git a/restyaboard.conf b/restyaboard.conf index 73509462a..8f3ed0e0f 100644 --- a/restyaboard.conf +++ b/restyaboard.conf @@ -33,16 +33,6 @@ server { deny all; } - 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 ~ \.php$ { try_files $uri =404; include fastcgi_params; From 89829a8fa9da5c344c4bf92a48113be234bdc155 Mon Sep 17 00:00:00 2001 From: saravanan_477at17 Date: Mon, 28 Feb 2022 17:25:16 +0530 Subject: [PATCH 4/9] 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) { From b23b8aa33aebac41d077052585eead99606a7768 Mon Sep 17 00:00:00 2001 From: saravanan_477at17 Date: Mon, 28 Feb 2022 18:12:11 +0530 Subject: [PATCH 5/9] Fixes #4383: Diagnose file changes added --- README.md | 3 ++- diagnose.php | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2912cc830..f35cb28cd 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,10 @@ sudo ./restyaboard.sh ### Diagnose Configuration * 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 configure the password authentication for the diagnose page in the Apache server by following the instructions from the [link](https://stackoverflow.com/a/8275094) * 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/ +* You can also configure the different password in the Apache server configuration for the diagnose page by following the instructions from the link https://www.web2generators.com/apache-tools/htpasswd-generator ### Forum diff --git a/diagnose.php b/diagnose.php index 75c26c623..b326ff8c0 100755 --- a/diagnose.php +++ b/diagnose.php @@ -12,12 +12,6 @@ * @license http://restya.com/ Restya Licence * @link http://restya.com/ */ -if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_USER'] != 'restya' ||$_SERVER['PHP_AUTH_PW'] != 'restya123') { // https://www.php.net/manual/en/features.http-auth.php - header("WWW-Authenticate: Basic realm=\"Newsletter\""); - header("HTTP/1.0 401 Unauthorized"); - echo '

Rejected!

Wrong Username or Password!'; - exit; -} $nginx_class = true; exec("which nginx", $nginx_version); if (!empty($nginx_version[0])) { From e60a3641b33464eac356a2a50ef837c4f7d99659 Mon Sep 17 00:00:00 2001 From: saravanan_477at17 Date: Mon, 28 Feb 2022 19:05:02 +0530 Subject: [PATCH 6/9] Fixes #4386: SecuritySalt changes added --- client/js/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/js/application.js b/client/js/application.js index 7c033316d..5136fe622 100644 --- a/client/js/application.js +++ b/client/js/application.js @@ -34,7 +34,7 @@ var R_MLDAP_LOGIN_HANDLE = ''; var R_MLDAP_SERVERS = ''; var last_activity = ''; var previous_date = ''; -var SecuritySalt = 'e9a556134534545ab47c6c81c14f06c0b8sdfsdf'; +const SecuritySalt = 'e9a556134534545ab47c6c81c14f06c0b8sdfsdf'; var last_user_activity_id = 0, load_more_last_board_activity_id = 0, last_board_activity_id = 0, From 113d7f597009268835c652c3f23ce7d71b67f839 Mon Sep 17 00:00:00 2001 From: saravanan_477at17 Date: Tue, 1 Mar 2022 11:36:54 +0530 Subject: [PATCH 7/9] Fixes #4383: Diagnose file changes added --- docker-scripts/nginx.conf | 10 ------ ...board-nginx-reverse-proxy-configuration.md | 35 +++++++++++++++---- restyaboard.conf | 10 ------ 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/docker-scripts/nginx.conf b/docker-scripts/nginx.conf index b3dfc6f5e..7f048a0aa 100644 --- a/docker-scripts/nginx.conf +++ b/docker-scripts/nginx.conf @@ -42,16 +42,6 @@ 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/docs/restyaboard-nginx-reverse-proxy-configuration.md b/docs/restyaboard-nginx-reverse-proxy-configuration.md index dc1190b3d..806c55417 100644 --- a/docs/restyaboard-nginx-reverse-proxy-configuration.md +++ b/docs/restyaboard-nginx-reverse-proxy-configuration.md @@ -1,16 +1,39 @@ --- -description: Restyaboard Configuration, here you can check Configuration of Restyaboard on an NGINX Reverse proxy +description: Restyaboard Configuration, here you can check Configuration of Restyaboard on an NGINX --- -# Configuration of Restyaboard on an NGINX Reverse proxy +# Configuration of Restyaboard on an NGINX ## Configuration of Restyaboard on an NGINX Reverse proxy * For configuring Restyaboard on a Nginx Reverse proxy, you have to set Host header: **Example** +``` + location / { + proxy_set_header Host $host; # important + proxy_pass http://localhost:8000; + } +``` -location / { - proxy_set_header Host $host; # important - proxy_pass http://localhost:8000; -} +## Configuration of Diagnose with password authentication + +* You can enable the password authentication for the diagnose page by adding the below lines + +**Example** +``` + 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; + } +``` + +* You can configure the password authentication for the diagnose page in the Apache server by following the instructions from the [link](https://stackoverflow.com/a/8275094) +* 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/](https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/) +* You can also configure the different password in the Apache server configuration for the diagnose page by following the instructions from the link [https://www.web2generators.com/apache-tools/htpasswd-generator](https://www.web2generators.com/apache-tools/htpasswd-generator) \ No newline at end of file diff --git a/restyaboard.conf b/restyaboard.conf index 0fad73da6..8f3ed0e0f 100644 --- a/restyaboard.conf +++ b/restyaboard.conf @@ -42,16 +42,6 @@ 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) { From e5661c5afa77c59a173a8e5b472dde1a9da0d86f Mon Sep 17 00:00:00 2001 From: saravanan_477at17 Date: Tue, 1 Mar 2022 11:38:00 +0530 Subject: [PATCH 8/9] Fixes #4383: Diagnose file changes added --- README.md | 9 ++--- docker-scripts/nginx.conf | 10 ------ ...board-nginx-reverse-proxy-configuration.md | 35 +++++++++++++++---- restyaboard.conf | 10 ------ 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index f35cb28cd..412e23c1f 100644 --- a/README.md +++ b/README.md @@ -72,12 +72,9 @@ sudo ./restyaboard.sh * Change admin email and password * To add/reply cards via email, visit `/#/settings/10` to configure IMAP settings -### Diagnose Configuration -* 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 configure the password authentication for the diagnose page in the Apache server by following the instructions from the [link](https://stackoverflow.com/a/8275094) -* 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 Apache server configuration for the diagnose page by following the instructions from the link https://www.web2generators.com/apache-tools/htpasswd-generator +### Diagnose Configuration + +* You can enable the password authentication for the diagnose page by following the instructions from the documentation link [https://restya.com/board/docs/restyaboard-nginx-reverse-proxy-configuration/#configuration-of-diagnose-with-password-authentication](https://restya.com/board/docs/restyaboard-nginx-reverse-proxy-configuration/#configuration-of-diagnose-with-password-authentication) ### Forum diff --git a/docker-scripts/nginx.conf b/docker-scripts/nginx.conf index b3dfc6f5e..7f048a0aa 100644 --- a/docker-scripts/nginx.conf +++ b/docker-scripts/nginx.conf @@ -42,16 +42,6 @@ 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/docs/restyaboard-nginx-reverse-proxy-configuration.md b/docs/restyaboard-nginx-reverse-proxy-configuration.md index dc1190b3d..806c55417 100644 --- a/docs/restyaboard-nginx-reverse-proxy-configuration.md +++ b/docs/restyaboard-nginx-reverse-proxy-configuration.md @@ -1,16 +1,39 @@ --- -description: Restyaboard Configuration, here you can check Configuration of Restyaboard on an NGINX Reverse proxy +description: Restyaboard Configuration, here you can check Configuration of Restyaboard on an NGINX --- -# Configuration of Restyaboard on an NGINX Reverse proxy +# Configuration of Restyaboard on an NGINX ## Configuration of Restyaboard on an NGINX Reverse proxy * For configuring Restyaboard on a Nginx Reverse proxy, you have to set Host header: **Example** +``` + location / { + proxy_set_header Host $host; # important + proxy_pass http://localhost:8000; + } +``` -location / { - proxy_set_header Host $host; # important - proxy_pass http://localhost:8000; -} +## Configuration of Diagnose with password authentication + +* You can enable the password authentication for the diagnose page by adding the below lines + +**Example** +``` + 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; + } +``` + +* You can configure the password authentication for the diagnose page in the Apache server by following the instructions from the [link](https://stackoverflow.com/a/8275094) +* 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/](https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/) +* You can also configure the different password in the Apache server configuration for the diagnose page by following the instructions from the link [https://www.web2generators.com/apache-tools/htpasswd-generator](https://www.web2generators.com/apache-tools/htpasswd-generator) \ No newline at end of file diff --git a/restyaboard.conf b/restyaboard.conf index 0fad73da6..8f3ed0e0f 100644 --- a/restyaboard.conf +++ b/restyaboard.conf @@ -42,16 +42,6 @@ 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) { From 96982031b17610a1eea224c9625b17303d399391 Mon Sep 17 00:00:00 2001 From: S SARAVANAN Date: Thu, 10 Mar 2022 19:06:47 +0530 Subject: [PATCH 9/9] Fixes #4383: Diagnose file changes added --- restyaboard.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/restyaboard.conf b/restyaboard.conf index 8f3ed0e0f..83621345e 100644 --- a/restyaboard.conf +++ b/restyaboard.conf @@ -32,7 +32,7 @@ server { location ^~ /media { deny all; } - + location ~ \.php$ { try_files $uri =404; include fastcgi_params;