1 yum install -y epel-release
2.yum install -y nginx
3. systemctl start nginx
4.systemctl enable nginx
5. systemctl status nginx
6.测试 localhost:80 出现如下页面,表示nginx安装成功。
nginx 欢迎页面7. 打开 /etc/nginx/nginx.conf, 添加如下高亮的部分。重启nginx : systemctl restart nginx
nginx.conf
网友评论