Skip to content

Instantly share code, notes, and snippets.

@rossta
Created June 3, 2014 20:10
Show Gist options
  • Select an option

  • Save rossta/56f762e1dae974c12576 to your computer and use it in GitHub Desktop.

Select an option

Save rossta/56f762e1dae974c12576 to your computer and use it in GitHub Desktop.
nginx functions
lsnginx() {
ps -A -o pid,command | grep '[n]ginx'
}
startnginx() {
sudo nginx -c /web/platform/config/nginx/nginx.conf
}
startnginxssl() {
sudo nginx -c /web/platform/config/nginx/nginx.ssl.conf
}
stopnginx() {
sudo kill -QUIT $( cat /var/run/nginx.pid )
}
restartnginx() {
lnginx
echo "Restarting nginx..."
stopnginx
sleep 2
startnginx
sleep 2
lnginx
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment