0

I am trying to run NGINX locally on my windows computer.

I installed the pkg from https://nginx.org/en/download.html & un zipped it to my c drive and tried to run nginx -v and i got this err

**nginx : The term 'nginx' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • nginx -v
  •   + CategoryInfo          : ObjectNotFound: (nginx:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

I am using html css and js and like to use nginx for static content. 

I really dont understand what I am doing wrong..
  • If `nginx.exe` is located in the _current directory_, `cmd.exe` allows you to call it _by name only_ - `nginx .exe` or `nginx ` - or, with an explicit path, `.\nginx`; **In PowerShell, _only_ `.\nginx` (or `./nginx`) works**, because, by security-minded design, PowerShell requires you to signal the intent to invoke an executable located in the _current_ directory explicitly. – mklement0 Dec 10 '22 at 23:21
  • The previous comment summarizes the information in the first linked duplicate. If your problem is instead related to expecting `nginx` to be in `$env:PATH`, see the second duplicate. – mklement0 Dec 10 '22 at 23:21

0 Answers0