nginx configuration or /var/log as tmpfs

I wont to change the logdir of nginx to /tmp
I have changed e.g.:

rgrep error.log /var/www/_OS_SETTINGS/etc/nginx/ /var/www/_OS_SETTINGS/etc/nginx/nginx.conf:#error_log logs/error.log; /var/www/_OS_SETTINGS/etc/nginx/nginx.conf:error_log /tmp/error.log crit; /var/www/_OS_SETTINGS/etc/nginx/nginx.conf:#error_log logs/error.log info;

rgrep error.log /etc/nginx/ /etc/nginx/nginx.conf.dpkg-dist: error_log /tmp/error.log; /etc/nginx/nginx.conf.default:#error_log logs/error.log; /etc/nginx/nginx.conf.default:#error_log logs/error.log notice; /etc/nginx/nginx.conf.default:#error_log logs/error.log info; /etc/nginx/nginx.conf:#error_log logs/error.log; /etc/nginx/nginx.conf:error_log /tmp/error.log crit; /etc/nginx/nginx.conf:#error_log logs/error.log info;
But when I try to start nginx, I get this error:

killall nginx root@volumio:~# nginx nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)

BTW: How do I disable logging of nginx completely?

strange thing…

I tried another way to reduce writes on the SD-Card and mounted /var/log as tmpfs. In /etc/init.d/myruns I added an mkdir for /var/log/nginx.
All (?) necessary files are present:

ls /var/log/nginx access.log command.log db.log error.log
nginx starts without any errors - but volumio-GUI doesn’t respond any more.

w3m http://localhost
localhost contacted. Waiting for reply...[/code]
No response ad infinitum... After CTRL-C:
w3m: Can't load http://localhost
[code] cat /var/log/nginx/access.log |grep w3m - - [30/Jan/2014:21:05:50 +0100] "GET / HTTP/1.0" 499 0 "-" "w3m/0.5.3+cvs-1.1055"

No entries in the errorlog

I installed phpmp - that works with nginx

I rebooted without tmpfs for /var/log - and volumio-GUI is back.

What’s going on there?

A little bit more input. :wink:

I checked /var/log/php_errors.log. There are a lot of error messages, if /var/log is a ramdisk:

These errors are not present, if /var/log is on the SD-Card.

Then I tried this (/var/log = tmpfs):

sudo killall player_wrk.php sudo /var/www/command/ startup & > /dev/null 2>&1
Now volumio-GUI ist accessable again.

What can I do to prevent this behavior?

BTW: Why do I all these silly things? :wink:

volumio-GUI is flooding the /var/log/php_error.log:
The SD-Card doesn’t like that. And I’m too stupid for disabling logs in php.ini.
And there are a few more logfiles…

Ok, a simple sleep 30 before /var/www/command/ startup & > /dev/null 2>&1 in rc.local may be be a good idea. :wink:

Edit: A better one and more solid is an at-job in rc.local. :wink: