with one click
nginx-config-creator
// Creates a standard Nginx/OpenResty reverse proxy config file for a service and reloads the web server. Features safety checks and environment awareness. Takes service name, domain, and port as main arguments.
// Creates a standard Nginx/OpenResty reverse proxy config file for a service and reloads the web server. Features safety checks and environment awareness. Takes service name, domain, and port as main arguments.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | nginx-config-creator |
| description | Creates a standard Nginx/OpenResty reverse proxy config file for a service and reloads the web server. Features safety checks and environment awareness. Takes service name, domain, and port as main arguments. |
| metadata | {"openclaw":{"requires":{"bins":["bash","docker"]}}} |
This skill automates the creation of Nginx/OpenResty reverse proxy configurations. It is designed for both ease of use and safety, incorporating environment awareness and a critical safety-check mechanism.
For maximum convenience, it is recommended to set the following environment variables on the host system:
NGINX_CONFIG_PATH: The absolute path to the Nginx conf.d directory.NGINX_CONTAINER_NAME: The name of the running Nginx/OpenResty Docker container.If these are not set, they must be provided as command-line arguments.
scripts/create-and-reload.shThis script performs the entire operation.
--service-name: (Required) The short name for the service (e.g., grafana).--domain: (Required) The root domain name (e.g., example.com).--port: (Required) The local port the service is running on (e.g., 3000).--config-path: (Optional) The path to Nginx's conf.d directory. Overrides the NGINX_CONFIG_PATH environment variable.--container-name: (Optional) The name of the Nginx Docker container. Overrides the NGINX_CONTAINER_NAME environment variable.nginx -t is displayed..conf file in the target directory.nginx -t inside the specified container.nginx -s reload.Scenario 1: Environment variables are pre-set
# Set for future convenience
export NGINX_CONFIG_PATH="/path/to/your/nginx/conf.d"
export NGINX_CONTAINER_NAME="your_nginx_container"
# Now, the command is very simple:
bash skills/nginx-config-creator/scripts/create-and-reload.sh \
--service-name "grafana" \
--domain "example.com" \
--port "3000"
Scenario 2: No environment variables (providing all info via arguments)
bash skills/nginx-config-creator/scripts/create-and-reload.sh \
--service-name "grafana" \
--domain "example.com" \
--port "3000" \
--config-path "/path/to/your/nginx/conf.d" \
--container-name "your_nginx_container"
nginx -t Fails: The skill is designed to be safe. It will not attempt to reload a broken configuration. It will clean up after itself and show you the exact error, ensuring the live web server is never affected.