Create a batch script for the logrotate and save it as nginx_logrotate.bat
1 | rem get date in format ddMMyyyyhhmmss |
If you run nginx as a windows service, make sure to execute the windows scheduler with the same user as the nginx windows service is running.
When you’re getting the following error: could not open error log file: CreateFile() “F:\Programme\nginx\nginx.exe/logs/error.log” failed (3: The system cannot find the path specified), make sure to not add nginx.exe to the parameter value