摘要:具体步骤:(推荐教程:nginx教程)1、下载”epel-release”wget http://dl.Fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm2、安装”epel-release”软件包rpm -ivh
具体步骤:
(推荐教程:nginx教程)
1、下载”epel-release”
wget http://dl.Fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
2、安装”epel-release”软件包
rpm -ivh epel-release-latest-7.noarch.rpm
3、yum安装nginx
yum install nginx
4、启动nginx
systemctl start nginx
5、关闭nginx
systemctl start nginx
6、刷新nginx配置(无需重启nginx)
nginx -s reload
7、nginx配置
配置文件路径:/etc/nginx/nginx.conf
注意事项:
(1)
upstream alias{ server localhost:port; }
此处配置服务
(2)
location / { proxy_pass http://alias; }
(3)
(1)和(2)alias保持一致
相关文章推荐
网站谷歌评分90+意味着什么?2022-09-06
怎样将不安全网站变成安全网站访问?2022-09-26
网站排名下降,可能跟算法更新没关系2022-09-20
网站如何设置高质量的网页标题?2022-09-14
做外贸网站选哪些语言?法语、德语最吃香2022-09-13