I'm using nginx
on OS X 10.8. Freshly installed nginx
but can't find a way to restart nginx except kill nginx_pid
say kill 64116
. Wondering if there are better ways to restart nginx
.
Found some methods on Google and SO but didn't work:
nginx -s restart sudo fuser -k 80/tcp ; sudo /etc/init.d/nginx restart
The error message for nginx -s restart
is
nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
Sometimes also get this error msg:
nginx: invalid option: "-s restart"
The correct way to do this for Nginx installed via MacPorts: Start: sudo port load nginx. Stop: sudo port unload nginx.
Try running sudo nginx
before starting nginx.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With