3

I'm trying to get Nginx to log both in a log file and to stderr. The reasoning behind this is that I want Nginx to log to a log file as well as to journald. From the research and tests I've done I can make it do one or the other, but not both.

To a log file:

error_log             /var/log/nginx/error.log;

To journald:

error_log             stderr;

Which I did in:

/etc/nginx/sites-available/DOMAIN.COM.conf

Is doing something like this possible? If so how would it be done?

thatguy
  • 31
  • 2
  • 1
    And just after I posted this I found the solution. You just need to add each error_log entry on it's own line and now it works like a champ. – thatguy Jun 09 '16 at 14:59
  • 3
    You can post that with embellishments as an [answer to your own question](http://serverfault.com/help/self-answer). – Richard Smith Jun 09 '16 at 15:56

0 Answers0