nginx在centos7.3下的部署


本文摘自PHP中文网,作者V,侵删。

具体步骤:

(推荐教程:nginx教程)

1、下载”epel-release”

1

wget http://dl.Fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

2、安装”epel-release”软件包

1

rpm -ivh epel-release-latest-7.noarch.rpm

3、yum安装nginx

1

yum install nginx

4、启动nginx

1

systemctl start nginx

5、关闭nginx

1

systemctl start nginx

6、刷新nginx配置(无需重启nginx)

1

nginx -s reload

7、nginx配置

配置文件路径:/etc/nginx/nginx.conf

注意事项:

(1)

1

2

3

upstream alias{

        server localhost:port;

    }

此处配置服务

(2)

1

2

3

location / {

        proxy_pass http://alias;

    }

(3)

(1)和(2)alias保持一致

e726ffcdc626232c6f4fb3e479ead69.png

以上就是nginx在centos7.3下的部署的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

nginx怎么配置404

怎么更改nginx配置文件

nginx的优势体现在哪几个方面

nginx与php怎么处理用户请求

linux如何启动nginx

tomcat有必要加nginx

nginx主要特点介绍

怎么在linux系统中以单容器安装nginx+asp.net core

linux中nginx反向代理下的tomcat集群的详解

nginx是什么意思

更多相关阅读请进入《nginx》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...

    正在狠努力加载,请稍候...