信息发布→ 登录 注册 退出

nginx在centos7.3下的部署

发布时间:2020-08-26

点击量:

具体步骤:

(推荐教程: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保持一致

标签:# nginx  # 软件包  # 重启  # 配置文件  # latest  # Fedoraproject  # pub  # org  # ivh  # yum  # install  
在线客服
服务热线

服务热线

4008888355

微信咨询
二维码
返回顶部
×二维码

截屏,微信识别二维码

打开微信

微信号已复制,请打开微信添加咨询详情!