Nginx service not starting on Windows 10 - nginx: [alert] could not open error log file: CreateFile() Nginx service not starting on Windows 10 - nginx: [alert] could not open error log file: CreateFile() nginx nginx

Nginx service not starting on Windows 10 - nginx: [alert] could not open error log file: CreateFile()


You need:

To install nginx/Windows, download the latest mainline version distribution (1.13.8), since the mainline branch of nginx contains all known fixes. Then unpack the distribution, go to the nginx-1.13.8 directory, and run nginx. Here is an example for the drive C: root directory: (Run cmd as administrator)

cd c:\unzip nginx-1.13.8.zipcd nginx-1.13.8start nginx

Go to: http://localhost:80 -> test install

Goback to console cmd: "nginx -s stop"

Run for next time:

  1. Config with file: "C:\nginx-1.13.8\conf\nginx.conf"
  2. Open cmd as administrator
  3. Run bash: "cd C:\nginx-1.13.8"
  4. Run nginx with bash: "start nginx" . If you run with bash: "nginx", will get trouble for exit nginx.
  5. And

    nginx -s stop #fast shutdown

    nginx -s quit #graceful shutdown

    nginx -s reload #changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes

    nginx -s reopen #re-opening log files


Under the directory that you run nginx.exe, try to create a directory named logs, and a file named error.log under log.It should pass this error.


  1. After downloading zip file, you have unzip.
  2. Make sure that you dont have nested folder names. You have to copy your folder which has nginx.exe file in it, and paste it into C:/ folder.
  3. While running commands, like nginx -s stop, make sure that current your working directory is same as the nginx.exe file.enter image description here