查看安装nginx都安装了什么内容
rpm –ql nginx
rpm -ql nginx
查看nginx的详细信息:
nginx -v
查看是否有root用户
id root
查看nginx配置文件语法是否正确:nginx -t
nginx -t
重启nginx:
systemctl restart nginx
查看端口:
netstat -tunlp
查看Nginx服务的状态
systemctl status nginx
使用netstat命令检查Nginx监听端口
netstat -nltp | grep nginx
启动nginx
systemctl start nginx
关闭nginx
systemctl stop nginx
重新加载配置文件
systemctl reload nginx