在FreeBSD下默认安装的文件一般情况下配置文件在/usr/local/etc/ 执行文件在/usr/local/sbin/
重新载入nginx配置命令
/usr/local/sbin/nginx -s reload
以下脚本存为nginx 给预执行权限 操作时,可以 nginx start| nginx stop | nginx test | nginx restart | nginx show
#!/usr/local/bin/bash case $1 in start) /usr/local/sbin/nginx ;; stop) killall -9 nginx ;; test) nginx -t -c /usr/local/etc/nginx/nginx.conf ;; restart) ps auxww | grep nginx | grep master | awk '{print $2}' | xargs kill -HUP ;; show) ps -aux|grep nginx