From 06552654feb762b534f34b5e07e01862261d8ff8 Mon Sep 17 00:00:00 2001 From: Erreur32 Date: Fri, 12 Jul 2024 22:12:38 +0200 Subject: [PATCH 1/2] Update nginx_proxy_manager_cli.sh --- nginx_proxy_manager_cli.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx_proxy_manager_cli.sh b/nginx_proxy_manager_cli.sh index fe23f11..9e92617 100755 --- a/nginx_proxy_manager_cli.sh +++ b/nginx_proxy_manager_cli.sh @@ -282,9 +282,9 @@ fi check_nginx_access() { if ping -c 2 -W 2 $NGINX_IP &> /dev/null; then if curl --output /dev/null --silent --head --fail "$BASE_URL"; then - echo -e "\n ✅ Nginx url: $BASE_URL" + echo -e "\n ✅ Nginx url: $BASE_URL" else - echo -e "\n ⛔ Nginx url ⛔ $BASE_URL is NOT accessible." + echo -e "\n ⛔ Nginx url ⛔ $BASE_URL is NOT accessible." exit 1 fi else From 511d360054c42e37a3759ecd00e840537a313613 Mon Sep 17 00:00:00 2001 From: Erreur32 Date: Fri, 12 Jul 2024 22:30:04 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index e2c050f..c60f98a 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,29 @@ API_PASS="password" ./nginx_proxy_manager_cli.sh -d example.com -i 192.168.1.10 -p 8080 -a 'proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' ``` + +# Procedure to Enable SSL for the First Time + +## Generate SSL Certificate: + + ./nginx_proxy_manager_cli.sh --generate-cert example.com admin@example.com + +## Enable SSL for the Host: + + Assuming the host ID is *1*, you would enable SSL for the host as follows: + + ./nginx_proxy_manager_cli.sh --ssl-host-enable 1 + +## Verifying the Configuration + + After running the above commands, you can verify the SSL configuration by checking the details of the proxy host. + + ./nginx_proxy_manager_cli.sh --show-host 1 + +This command will show the full details of the proxy host with ID *1*, including whether SSL is enabled. + +By following these steps, you can enable SSL for your proxy host for the first time using Let's Encrypt. + ![https://github.com/Erreur32/nginx-proxy-manager-API/blob/main/screen-nginx-proxy-default.png](https://github.com/Erreur32/nginx-proxy-manager-API/blob/main/screen-nginx-proxy-default.png)