A simple yet powerful command-line tool for quickly generating customized Nginx configurations.
The cnc
Bash script simplifies the creation of Nginx configuration files for different domains. It supports setting up HTTP and HTTPS listeners, including redirects and proxy settings.
- Automatic generation of Nginx configurations.
- SSL support with Let's Encrypt.
- Easy customization with parameters for IP, port, and domain name.
- Option to either display the configuration in the terminal or save it to a file.
- Download the
cnc.sh
script. - Make it executable with
chmod +x cnc.sh
. - Run the script with the required parameters. For example:
./cnc.sh --ip=192.168.1.1 --port=8080 --domain=example.com
- For help, use ./cnc.sh --help.
To use cnc as a native command from any directory:
- Move the script to a directory in your system's PATH, such as /usr/local/bin/:
sudo mv cnc.sh /usr/local/bin/cnc
- Ensure the script is executable:
sudo chmod +x /usr/local/bin/cnc
- Now, you can run cnc from anywhere in the terminal:
cnc --help
- A Unix-based operating system.
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request.