nginx安装配置

CentOS7安装Nginx

https://www.cnblogs.com/boonya/p/7907999.html

 

 

Nginx安装,目录结构与配置文件详解   -源码安装

https://www.cnblogs.com/liang-io/p/9340335.html

yum安装

https://blog.csdn.net/qq_34200979/article/details/123016644

添加CentOS 7 Nginx yum资源库(如果能上外网, 可跳过这步)

[root@localhost ~]# rpm -Uvh  http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm     
yum -y install nginx   //安装nginx
systemctl start nginx   //启动nginx

yum方式安装的默认地址和配置的默认地址

/etc/nginx/nginx.conf  //yum方式安装后默认配置文件的路径
/usr/share/nginx/html  //nginx网站默认存放目录
/usr/share/nginx/html/index.html //网站默认主页路径
8080 //默认端口

posted @ 2021-08-16 11:05  大道至简,各有其道。  阅读(33)  评论(0)    收藏  举报