为您配置nginx反向代理的便捷工具
ngrp的Python项目详细描述
NGRP
为您配置nginx反向代理的便捷工具
安装
pip install ngrp
用法
Usage: ngrp [OPTIONS] COMMAND [ARGS]...
Nginx domains configuration tool.
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
add Add and enable a domain configuration.
disable Disable configuration for given domain.
enable Enable configuration for given domain.
reload Reload nginx configuration.
ngrp支持多个反向代理模板。
Usage: ngrp add [OPTIONS] COMMAND [ARGS]...
Add and enable a domain configuration.
Options:
--help Show this message and exit.
Commands:
http Redirect DOMAIN traffic to 127.0.0.1:PORT
https Redirect DOMAIN traffic to 127.0.0.1:PORT
static-http Serve content from WEBSITE_ROOT on DOMAIN
static-https Serve content from WEBSITE_ROOT on DOMAIN
< >添加HTTP反向代理,执行以下操作({{EM1}$EthPad在端口{{CD1>}上运行,代理到{{CD2>} EEM>):ngrp add http 9001 etherpad.example.com
要使配置更改生效,需要重新加载nginx配置:
ngrp reload