Reputation: 6234
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?
Upvotes: 8
Views: 23683
Reputation: 145
If your Nginx is at D:\nginx\nginx.exe
, execute this to start nginx
D:\nginx\nginx.exe -c D:\nginx\conf\nginx.conf -p D:\nginx\
Upvotes: 4
Reputation: 1
For Nginx on Windows, you need to execute nginx server related command from respective home directory where nginx configuration file is located.
Upvotes: 0
Reputation: 373
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.
Create folder name logs, and in that folder create a file name error.log
as.
Upvotes: 1