12128 . [ Examples] ( #examples )
1313 - [ Info script] ( #info )
1414 - [ List HOST] ( #list )
15- - [ Enable SSL] ( #ssl )
15+ - [ Enable SSL] ( #ssl )
16+ - [ update specific fields of an existing proxy host] ( #update )
161712 . [ Screens] ( #screens )
171813 . [ TODO] ( #todo )
1819
@@ -127,7 +128,8 @@ BASE_DIR="/path/nginx_proxy_script/data"
127128# --delete-cert domain Delete certificate for the given domain
128129# --list-access List all available access lists (ID and name)
129130# --host-acl-enable id,access_list_id Enable ACL for a proxy host by ID with an access list ID
130- # --host-acl-disable id Disable ACL for a proxy host by ID
131+ # --host-acl-disable id Disable ACL for a proxy host by ID
132+ # --update-host id field=value Modify any field on existing entry host
131133# --help Display this help
132134
133135```
@@ -161,14 +163,42 @@ BASE_DIR="/path/nginx_proxy_script/data"
161163
162164```
163165
166+ #### update
167+ ##### update specific fields of an existing proxy host
164168
165- ##### Verifying the Configuration
169+ The ` --update-host ` command allows you to ** update specific fields ** of an existing proxy host in Nginx Proxy Manager ** without recreating it ** .
166170
167- ###### Info
171+ Simply specify the ** proxy host ID ** and the ** field you want to update ** , like this:
168172
169- Some info of settings in the script with ` ./nginx_proxy_manager_cli_.sh --info `
173+ ``` bash
174+ ./nginx_proxy_manager_cli.sh --update-host 42 forward_host=new.backend.local
175+ ```
176+
177+ | Field Name | Type | Description |
178+ | --------------------------| -----------| -----------------------------------------------------------------------------|
179+ | ` domain_names ` | ` array ` | List of domains handled by this proxy. |
180+ | ` forward_host ` | ` string ` | The destination (backend) hostname or IP. |
181+ | ` forward_port ` | ` integer ` | The destination port (e.g., ` 8000 ` , ` 443 ` ). |
182+ | ` forward_scheme ` | ` string ` | The scheme: ` http ` or ` https ` . |
183+ | ` enabled ` | ` boolean ` | Whether the proxy is enabled (` true ` or ` false ` ). |
184+ | ` ssl_forced ` | ` boolean ` | Redirect all HTTP requests to HTTPS. |
185+ | ` certificate_id ` | ` integer ` | The ID of the SSL certificate to use. |
186+ | ` meta.letsencrypt_agree ` | ` boolean ` | Agree to Let's Encrypt TOS (` true ` or ` false ` ). |
187+ | ` meta.dns_challenge ` | ` boolean ` | Use DNS challenge for SSL cert (` true ` or ` false ` ). |
188+ | ` allow_websocket_upgrade ` | ` boolean ` | Enable WebSocket support (` true ` or ` false ` ). |
189+ | ` http2_support ` | ` boolean ` | Enable HTTP/2 (` true ` or ` false ` ). |
190+ | ` caching_enabled ` | ` boolean ` | Enable caching (` true ` or ` false ` ). |
191+ | ` block_exploits ` | ` boolean ` | Block known exploits (` true ` or ` false ` ). |
192+ | ` advanced_config ` | ` string ` | Custom Nginx directives (multiline string). |
193+ | ` locations ` | ` array ` | Custom location blocks (advanced use). |
194+
195+
196+
197+ #### Verifying the Configuration
170198
199+ Some info of settings in the script with ` ./nginx_proxy_manager_cli_.sh --info `
171200
201+ #### info
172202``` bash
173203./nginx_proxy_manager_cli_.sh --info
174204
@@ -186,11 +216,11 @@ Script Variables Information:
186216```
187217
188218
189- ** How to activate SSL ?**
219+ #### ** How to activate SSL ?**
190220
191221By following these steps, you can enable SSL for your proxy host for the first time using Let's Encrypt.
192222
193- ##### List
223+ #### List
194224 List all Host in one command and show ´id´ , ´status´ and ´SSL´ status:
195225
196226 ./nginx_proxy_manager_cli.sh --host-list
@@ -202,8 +232,8 @@ By following these steps, you can enable SSL for your proxy host for the first t
202232 3 tutu.fun enabled ✅
203233
204234
205- ##### SSL
206- Enable SSL for the Host:
235+ #### ssl
236+ ##### Enable SSL for the Host
207237
208238 Assuming the host ID is * 1* , you would enable SSL for the host as follows:
209239
@@ -219,11 +249,8 @@ Enable SSL for the Host:
219249 2 titi.fun disable ✅
220250 3 tutu.fun enabled ✅
221251
222-
223- Et Voilà.
224-
225252
226- ** Other Exemple command:**
253+ ##### ** Other Exemple command:**
227254
228255
229256Host proxy info command ` --host-show id `
@@ -293,6 +320,5 @@ Host proxy info command `--host-show id`
293320- [x] Add documentation on certain functions
294321- [x] ADD: a configuration function for Custom Locations
295322- [x] Backup all settings from NPM
296- - [ ] Domain TLS check validity
297- - [ ] Better Error Handeling
298- - [ ] Restore Function need to be optimized
323+ - [ ] creation of ACCESS list
324+ - [ ] Restore Function not work properly , need to find FIX.
0 commit comments