RPM方式安装
下载nginx
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
安装nginx
yum install nginx
切换到nginx目录
cd /etc/nginx/conf.d/default.conf
修改default.conf
- 举例如下
重启nginx
service nginx restart