1,将nginx添加到yum repro库中 [root@izbp1b498epn4trb75oykez ~]# rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm 2,查看nginx信息 [root@izbp1b498epn4trb75oykez ~]# yum info nginx 3,使用yum安装ngnix [root@izbp1b498epn4trb75oykez ~]# yum -y install nginx 4,启动nginx [root@izbp1b498epn4trb75oykez ~]# systemctl start nginx 复制代码
二、nginx配置
- 如果你是和我一步步操作下来,那么你的nginx配置文件地址应该和我是一样的
[root@izbp1b498epn4trb75oykez ~]# vi /etc/nginx/conf.d/default.conf 添加一个新的server,这个配置主要是将监听80端口,将来自dev.jindll.com的请求转发到本地4355端口 server { listen 80; server_name dev.jindll.com; location / { proxy_pass_header Server; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_pass http://127.0.0.1:4355; } } 复制代码
- 配置完成保存退出,然后重启nginx,使配置生效
[root@izbp1b498epn4trb75oykez conf.d]# systemctl reload nginx.service 复制代码
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Eric Meyer on CSS
Eric Meyer / New Riders Press / 2002-7-8 / USD 55.00
There are several other books on the market that serve as in-depth technical guides or reference books for CSS. None, however, take a more hands-on approach and use practical examples to teach readers......一起来看看 《Eric Meyer on CSS》 这本书的介绍吧!