mirror of
https://github.com/Erreur32/nginx-proxy-manager-Bash-API.git
synced 2024-12-22 05:22:11 +01:00
Update README.md
This commit is contained in:
parent
c70212f913
commit
bd2bbabc12
1 changed files with 37 additions and 34 deletions
71
README.md
71
README.md
|
@ -48,53 +48,56 @@ API_PASS="password"
|
|||
|
||||
## Options
|
||||
```tcl
|
||||
Options:
|
||||
-d DOMAIN_NAMES Domain name (required for creating/updating hosts)
|
||||
-i FORWARD_HOST IP address or domain name of the target server (required for creating/updating hosts)
|
||||
-p FORWARD_PORT Port of the target server (required for creating/updating hosts)
|
||||
-f FORWARD_SCHEME Scheme for forwarding (http/https, default: http)
|
||||
-s SSL_FORCED Force SSL (true/false, default: false)
|
||||
-c CACHING_ENABLED Enable caching (true/false, default: false)
|
||||
-b BLOCK_EXPLOITS Block exploits (true/false, default: true)
|
||||
-w ALLOW_WEBSOCKET_UPGRADE Allow WebSocket upgrade (true/false, default: true)
|
||||
-h HTTP2_SUPPORT Support HTTP/2 (true/false, default: true)
|
||||
-a ADVANCED_CONFIG Advanced configuration (block of configuration settings)
|
||||
-e LETS_ENCRYPT_AGREE Accept Let's Encrypt (true/false, default: false)
|
||||
-m LETS_ENCRYPT_EMAIL Email for Let's Encrypt (required if LETS_ENCRYPT_AGREE is true)
|
||||
-n DNS_CHALLENGE DNS challenge (true/false, default: false)
|
||||
-t TOKEN_EXPIRY Token expiry duration (default: 1y)
|
||||
--create-user user pass Create a user with a username and password
|
||||
--delete-user username Delete a user by username
|
||||
--delete-host id Delete a proxy host by ID
|
||||
--list-hosts List the names of all proxy hosts
|
||||
--list-hosts-full List all proxy hosts with full details
|
||||
--list-ssl-certificates List all SSL certificates
|
||||
--list-users List all users
|
||||
--search-host hostname Search for a proxy host by domain name
|
||||
--enable-host id Enable a proxy host by ID
|
||||
--disable-host id Disable a proxy host by ID
|
||||
--check-token Check if the current token is valid
|
||||
--backup Backup all configurations to a file
|
||||
--help Display this help
|
||||
-d DOMAIN_NAMES Domain name (required for creating/updating hosts)
|
||||
-i FORWARD_HOST IP address or domain name of the target server (required for creating/updating hosts)
|
||||
-p FORWARD_PORT Port of the target server (required for creating/updating hosts)
|
||||
-f FORWARD_SCHEME Scheme for forwarding (http/https, default: http)
|
||||
-c CACHING_ENABLED Enable caching (true/false, default: false)
|
||||
-b BLOCK_EXPLOITS Block exploits (true/false, default: true)
|
||||
-w ALLOW_WEBSOCKET_UPGRADE Allow WebSocket upgrade (true/false, default: true)
|
||||
-a ADVANCED_CONFIG Advanced configuration (block of configuration settings)
|
||||
-t TOKEN_EXPIRY Token expiry duration (default: 1y)
|
||||
--backup Backup all configurations to a file
|
||||
--check-token Check if the current token is valid
|
||||
--create-user user pass email Create a user with a username, password and email
|
||||
--delete-user username Delete a user by username
|
||||
--delete-host id Delete a proxy host by ID
|
||||
--show-host id Show full details for a specific host by ID
|
||||
--show-default Show default settings for creating hosts
|
||||
--list-hosts List the names of all proxy hosts
|
||||
--list-hosts-full List all proxy hosts with full details
|
||||
--list-ssl-certificates List all SSL certificates
|
||||
--list-users List all users
|
||||
--search-host hostname Search for a proxy host by domain name
|
||||
--enable-host id Enable a proxy host by ID
|
||||
--disable-host id Disable a proxy host by ID
|
||||
--generate-cert domain email Generate a Let's Encrypt certificate for the given domain and email
|
||||
--ssl-host-enable id Enable SSL, HTTP/2, and HSTS for a proxy host (need --generate-cert first)
|
||||
--ssl-host-disable id Disable SSL, HTTP/2, and HSTS for a proxy host
|
||||
--help Display this help
|
||||
|
||||
```
|
||||
|
||||
## Examples
|
||||
```bash
|
||||
Usage:
|
||||
./nginx_proxy_manager_cli.sh [OPTIONS]
|
||||
Backup First !
|
||||
./nginx_proxy_manager_cli.sh --backup
|
||||
|
||||
Examples:
|
||||
./nginx_proxy_manager_cli.sh -d example.com -i 192.168.1.10 -p 8080 -s true
|
||||
./nginx_proxy_manager_cli.sh -d example.com -i 192.168.1.10 -p 8080 (check default values below)
|
||||
./nginx_proxy_manager_cli.sh --show-default
|
||||
./nginx_proxy_manager_cli.sh --create-user newuser password123 user@example.com
|
||||
./nginx_proxy_manager_cli.sh --delete-user 'username'
|
||||
./nginx_proxy_manager_cli.sh --list-hosts
|
||||
./nginx_proxy_manager_cli.sh --backup
|
||||
|
||||
./nginx_proxy_manager_cli.sh --generate-cert example.com user@example.com
|
||||
./nginx_proxy_manager_cli.sh --ssl-host-enable 1
|
||||
|
||||
Advanced proxy tab example:
|
||||
./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;'
|
||||
|
||||
```
|
||||
|
||||
![https://github.com/Erreur32/nginx-proxy-manager-API/blob/main/screen-nginx-proxy.png](https://github.com/Erreur32/nginx-proxy-manager-API/blob/main/screen-nginx-proxy.png)
|
||||
![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)
|
||||
|
||||
## TODO:
|
||||
- [x] add setting for ADVANCED configuration in `location / { ... }`
|
||||
|
|
Loading…
Reference in a new issue