配置命令
随服务器启动
# systemctl enable nginx.service
重启 nginx 服务
# systemctl restart nginx.service
停止 nginx 服务
# systemctl stop nginx.service
查看 nginx 运行状态
# systemctl status nginx.service
测试配置文件是否正常:
# /usr/sbin/nginx –t 测试是否启动成功:
#curl -i localhost
2022-12-31 16:12:16
随服务器启动
# systemctl enable nginx.service
重启 nginx 服务
# systemctl restart nginx.service
停止 nginx 服务
# systemctl stop nginx.service
查看 nginx 运行状态
# systemctl status nginx.service
测试配置文件是否正常:
# /usr/sbin/nginx –t 测试是否启动成功:
#curl -i localhost