I'm running nginx 1.3.5 under windows seven, I need to execute nginx directly from a read-only media (CD or DVD), but when I want to run it, it fails with this error:
nginx: [alert] could not open error log file: CreateFile() "logs/error.log" fail
ed (5: Access is denied)
2012/08/28 13:52:46 [emerg] 5604#2864: CreateDirectory() "J:\nginx-1.3.5/temp/client_body_temp" failed (5: Access is denied)
where J is my CD-ROM drive letter.
I've changed nginx.conf to disable logging completely, but seems anyway it still tries to build a file named 'error.log' in '/logs' folder & some extra temporary contents in '/temp' folder at the startup, so I want to change 'logs' & 'temp' directory path to windows temp folder (%temp%), but I dont have any idea that how can I do it.
Also I want to know why nginx still creates 'logs/error.log' after disableing error logging ?
http://nginx.org/en/docs/http/ngx_http_log_module.html lists the directives for controlling logging, specifcally you have the 2 following:
and
so while you can completely disable the access_log, the same doesn't seem to be true for the error_log. Nevertheless you can still achieve the effect you want by adding the following to your nginx config;
UPDATE: just noticed the windows tag, see this question for the windows /dev/null equivalent
as far as i know you can disable access logs but not errors ones. Nginx is trying to create/write messages into log file which is located on the CD/DVD. Try to set log directory into the HD partition, say C: or D: