Skip to content

Instantly share code, notes, and snippets.



Last active Feb 21, 2016
What would you like to do?
#!/usr/bin/env bash
DIRECTIVES="worker_processes 1; pid /var/run/nginx-${USER}.pid; error_log /dev/null;"
# nginx attempts to write to the default logfile location despite the passed directive, so grep those errors out
# (note that I may just be doing something stupid and not properly setting the directive)
$NGINX -t -c $1 -g "$DIRECTIVES" 2>&1 | grep -v '^nginx: '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment