🌴 Create and manage your Nginx configs from the command line.
composer global require la-moore/nginx-cli
Make sure to place Composer's system-wide vendor bin directory in your $PATH
so the nginx-cli
executable can be located by your system.
If you don't know where your $PATH
is, run this command to find out:
export PATH="$HOME/.composer/vendor/bin:$PATH"
Once installed, you should be able to run nginx-cli {command}
from within any directory.
composer global update la-moore/nginx-cli
Run this command to update the CLI tool to the most recent published version. If there's been a major version release, you may need to run require
instead of update.
Create a new domain config with the new
command:
nginx-cli new <example.com>
Enable a domain config with the enable
command:
nginx-cli enable <example.com>
Disable a domain config with the disable
command:
nginx-cli disable <example.com>
Reload Nginx with the reload
command:
nginx-cli reload
Start Nginx with the start
command:
nginx-cli start
Stop Nginx with the stop
command:
nginx-cli stop
Stop Nginx with the test
command:
nginx-cli test
Run tests with:
./vendor/bin/phpunit tests/NewCommandIntegrationTest.php