【问题标题】:Not able to run nginx command in E drive windows 7, but able to run from C:\nginx\无法在 E 盘 windows 7 中运行 nginx 命令,但可以从 C:\nginx\ 运行
【发布时间】:2021-07-23 14:36:08
【问题描述】:

我在 windows 7 中安装了 nginx,位置是 C:\nginx。我可以从这个位置运行 nginx 命令,但不能从另一个位置运行 nginx 命令。将系统变量路径设置为C:\nginx\nginx.exe,但仍然无法从其他位置运行nginx命令。

我必须运行 nginx -c "E:\GitHub\central-frontend\nginx.conf" -p "E:\GitHub\central-frontend\dist"nginx -c "%cd%\nginx.conf" -p "%cd%\dist" 从位置 E:\GitHub\central-frontend\ p>

现在当我从 E:\GitHub\central-frontend\ 运行此命令时,我收到此错误,

nginx : 术语“nginx”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名字的拼写, 或者如果包含路径,请验证路径是否正确并重试。 在 line:1 char:1

  • nginx -c "%cd%\nginx.conf" -p "%cd%\dist"
  •   + CategoryInfo          : ObjectNotFound: (nginx:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

【问题讨论】:

    标签: nginx windows-7


    【解决方案1】:

    将系统变量路径设置为nginx文件夹而不是实际的可执行文件,即C:\nginx而不是C:\nginx\nginx.exe

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-01-28
    • 2013-11-29
    • 1970-01-01
    • 1970-01-01
    • 2019-11-24
    • 2021-01-13
    • 1970-01-01
    • 2013-02-27
    相关资源
    最近更新 更多