基本操作
添加资源库
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
// 安装
yum install -y nginx
// 启动
service nginx start
// 停止
service nginx stop
// 重载
service nginx reload
配置虚拟主机
cd /etc/nginx/conf.d
cat default.conf
cp default.conf test.conf
网友评论