debugging nginx

Discussion in 'General' started by bax, Apr 23, 2014.

  1. bax

    bax Member

    Hi!

    I have a problem debugging nginx.
    I see it works as follows:
    set error_log to debug by adding this to the nginx vhost:
    Code:
    error_log /path/to/lot/debug.log debug;
    however, this only seems to work once per section (http{…}, server{…}, …).
    When I add
    Code:
    error_log /path/to/log/debug.log debug;
    to the nginx directives of my domain, I don't get any more error logs at all.
    This seems to be because I now have two error_log within the server{…} part.

    It seems I'd have to edit the vhost file in sites-enabled manually to enable debugging (which would only work until I edit the file the next time).

    Is this right?

    If it is, then it would be great if either the first error_log would get overwritten or if there was a drop-down option within the domain to choose error logging level (error, crit, notice, debug).

    Also see http://bugtracker.ispconfig.org/index.php?do=details&task_id=3454

    Thank you!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try:

    Code:
    server { ##merge##
    error_log /path/to/log/debug.log debug;
    }
    in nginx directives field.
     
  3. bax

    bax Member

    Just tried adding this to the bottom of the nginx directives field. No success.
    It just get added as is to the bottom of the vhost file and doesn't create any output…
     

Share This Page