-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为什么我点启用一下就给我开了两个nginx,但是点禁用缺只关闭了一个 #31
Comments
首先 用 https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer 看下进程树。 我还没在win上跑过nginx,等会我试一下。 |
哦 你语法有两个关键错误。
应该是
用双斜杠分割路径,以及cmd必须含有 解压到另外一个空目录运行一下CommandTrayHost,会自动生成一个config.json,打开它,最上面有几条注释,那个可以看一下。 根据你描述的现象,应该已经解决这个问题就是了。 我粗略看了下 http://nginx.org/en/docs/windows.html
晚些时候我研究下 |
@rexdf 非常感谢 |
@rexdf |
nginx自带守护,它会自动再次以子进程的方式再启动一个。你可以不用CommandTrayHost,直接用运行试一下,如下图所示。杀掉父进程,子进程并不会自动被杀掉。 启动那个父进程是用来守护worker进程的。worker进程应该就是用来处理外部网络请求的。 这样看似乎 重启( 虽然写两三个批处理,一个重启,一个关闭、一个启动,可以做成三个菜单,还可以绑定快捷键。但是这失去了CommandTrayHost主要的功能。 所以目前还是推荐用批处理来做这事了。 或者等我空下来读一下nginx源码,看有没有有啥比较优雅的方式, |
嗯 我又看了下,其实大部分功能好像都是期望的(虽然显示功能没有显示命令行界面,因为本来就没有),只是重启与关闭的时候 残留了那个子进程。 也许只要把子进程一同杀掉就好了? |
如果带命令行参数一定要加 |
试下最新版,现在不会有进程残留了。加了个参数 |
@rexdf 非常感谢 可以了 |
onfigs": [
{
"name": "nginx",
"path": "D:\nginx-1.14.0",
"cmd": "nginx",
"working_directory": "",
"addition_env_path": "",
"use_builtin_console": false,
"is_gui": false,
"enabled": true,
"require_admin": false,
"start_show": false,
"ignore_all": false,
"position": [
0.2,
200
],
"size": [
0.5,
0.5
],
"icon": "",
"alpha": 170,
"topmost": false,
"hotkey": {
"disable_enable": "Shift+Win+D",
"hide_show": "Shift+Win+H",
"restart": "Shift+Win+R",
"elevate": "Shift+Win+A"
},
"not_host_by_commandtrayhost": false,
"not_monitor_by_commandtrayhost": false,
"kill_timeout": 200,
"exclusion_id": 1
}
The text was updated successfully, but these errors were encountered: