Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.97 KB

README.md

File metadata and controls

52 lines (37 loc) · 1.97 KB

nginxctl

License Python version range Python lint & test black Imports: isort

Commands for modifying and controlling nginx over the command-line.

Install dependencies

pip install -r requirements.txt

Install package

pip install .

Examples

Serve local directory and then stop server

$ 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

License

Licensed under any of:

at your option.

Contribution

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.