安装nginx并使用其做反向代理

安装NGINX
yum install nginx -y
  • 启动NGINX服务
systemctl start nginx.service  
  • 设置开机自启动
systemctl enable nginx.service
  • 重启NGINX服务
systemctl restart nginx.service
  • 关闭NGINX服务
systemctl stop nginx.service
  • 重载NGINX配置(无需停止服务即可生效)
systemctl reload nginx.service
  • 本地测试是否启动成功
curl -I localhost 

猜你喜欢

转载自blog.csdn.net/icjs_cc/article/details/131663229