Nginx Proxy Manager技能使用说明
2026-04-01
新闻来源:网淘吧
围观:18
电脑广告
手机广告
NPM 代理技能
通过其 REST API 管理 Nginx 代理管理器 (NPM)。
配置
设置以下环境变量:

NPM_URL:您的 NPM 实例的 URL(例如,https://npm.example.com)NPM_EMAIL:您的 NPM 管理员邮箱NPM_PASSWORD:您的 NPM 管理员密码
使用
# List all proxy hosts
python scripts/npm_client.py hosts
# Get details for a specific host
python scripts/npm_client.py host <host_id>
# Enable/Disable a host
python scripts/npm_client.py enable <host_id>
python scripts/npm_client.py disable <host_id>
# Delete a host
python scripts/npm_client.py delete <host_id>
# List certificates
python scripts/npm_client.py certs
工作流程
添加新的代理主机
要添加新主机,请直接使用curl(当前脚本功能较为简单)。
针对POST /api/nginx/proxy-hosts的示例负载:
{
"domain_names": ["sub.example.com"],
"forward_scheme": "http",
"forward_host": "192.168.1.10",
"forward_port": 8080,
"access_list_id": 0,
"certificate_id": 0,
"ssl_forced": false,
"meta": {
"letsencrypt_email": "",
"letsencrypt_agree": false,
"dns_challenge": false
},
"advanced_config": "",
"locations": [],
"block_exploits": true,
"caching_enabled": false,
"allow_websocket_upgrade": true,
"http2_support": true,
"hsts_enabled": false,
"hsts_subdomains": false
}
启用 SSL (Let's Encrypt)
- 使用
certs命令列出证书以查看是否存在。 - 更新主机,使用
certificate_id和ssl_forced: true。
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Data Validation技能使用说明
下一篇:Habitica技能使用说明


微信扫一扫,打赏作者吧~