Commands for modifying and controlling nginx over the command-line.
pip install -r requirements.txt
pip install .
$ python -m nginxctl serve --temp_dir '/tmp' \
-b 'server' \
--server_name 'localhost' --listen '8080' \
-b location '/' \
--root '/tmp/wwwroot' \
-} \
-}
nginx is running. Stop with: /usr/local/bin/nginx -c /tmp/nginx.conf -s stop
$ curl -Is http://localhost:8080 | head -n1
127.0.0.1 - - [03/Apr/2020:01:21:45 +1100] "HEAD / HTTP/1.1" 200 0 "-" "curl/7.64.1"
HTTP/1.1 200 OK
$ python -m nginxctl nginx --temp_dir '/tmp' -s stop
Licensed under any of:
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
- CC0 license (LICENSE-CC0 or https://creativecommons.org/publicdomain/zero/1.0/legalcode)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.