Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nginx fails to create directories on Windows 10 with error: nginx: CreateFile()...failed

I need to find a way/setting to allow Nginx to run a .bat file that will create directories and files via a WINDOWS service; my OS is Windows 10. Currently, our windows service fails to create directories and files with the following:

CreateFile() "C:\someForlderName\build\distribution.\nginx/logs/error.log" failed (3: The system cannot find the path specified)

Somehow Nginx doesn't have enough permissions to perform write-access operations like creating directories such as /logs/ and /temp/ within the /Nginx/ directory.

Anybody ran into this problem before?

like image 972
pelican Avatar asked Feb 22 '16 21:02

pelican


1 Answers

I was facing the same problem, sharing the thing that worked for me.

Nginx is showing this error because... nginx didn't find the error.log file..

For that, Go to you nginx folder where other folders like conf, docs, html etc are their as.

Nginx folder structure

Create folder name logs, and in that folder create a file name error.logas.

error.log file

like image 195
Mark-VII Avatar answered Jan 04 '23 00:01

Mark-VII