nginx -t #查看nginx配置是否正确 ps -ef | grep nginx #查看nginx端口是否启动 telnet + ip + port #如: telnet 192.168.157.129 80 #没有telnet命令使用:yum install telnet 安装后使用。 ### nginx默认目录 /usr/share/nginx/html/ **mysql** systemctl start mysqld # 启动 systemctl stop mysqld # 停止 systemctl restart mysqld # 重启 **php-fpm** systemctl start php-fpm # 启动 systemctl stop php-fpm # 停止 systemctl restart php-fpm # 重启 **nginx** systemctl stop nginx 或者 service nginx stop就可以停止nginx了 service nginx start 是centos6.x的命令 , centos7.x使用 systemctl start nginx sudo fuser -k 80/tcp # 杀死80端口 /usr/local/nginx/sbin/nginx # 开启 /usr/local/nginx/sbin/nginx -s stop # 停止 /usr/local/nginx/sbin/nginx -s reopen # 重启 /usr/local/nginx/sbin/nginx -s reload # 重新载入配置文件