![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nginx
狗蛋1024
这个作者很懒,什么都没留下…
展开
-
ngixn 负载均衡
Nginx如何实现负载均衡?1、Nginx反向代理Nginx利用自身反向代理功能,在conf配置文件中添加反向代理地址,以代理服务器的身份接受客户端发送过来的请求,然后将请求转发给内部网络上的应用服务器,并将从服务器上得到的结果返回给客户端,此时代理服务器对外就表现为一个服务器,不过它只负责转发请求,不负责处理。2、Nginx转发策略Nginx转发请求可按照调度规则通过轮询、ip哈希、URL哈希、权重等多种方式对应用服务器做负载均衡,同时还支持后端服务器的健康检查,也就是上面讲的故障移除和.原创 2020-12-26 10:41:03 · 1207 阅读 · 0 评论 -
nginx 安装卸载
linux安装nginx步骤添加nginx存储库yum -y install epel-release安装nginxyum -y install epel-release启动nginxsystemctl start nginx如果想在系统启动时启用Nginxsystemctl enable nginxlinux卸载nginx步骤停止nginxsystemctl stop nginx删除Nginx的自动启动chkconfig nginx off删除ngi原创 2020-12-24 12:52:55 · 229 阅读 · 1 评论 -
nginx 前后端项目
nginx部署前后端分离项目保证系统安装nginx的前提条件下 将前端代码打包上传至服务器后端代码打包上传至服务器,端口指定8080编辑nginx的配置文件nginx.conflocation / { root /home/admin/test/dist;#前端代码绝对路径 index index.html index.htm;}location /prod-api/{ #/prod-api为访问后端服务统一前缀 proxy_pass http:原创 2020-12-25 15:02:34 · 555 阅读 · 0 评论 -
nginx 配置后缀
nginx设置通用访问后缀需求A描述:比如说服务器的访问路径中含有(.json,.axp,.php), 我们访问可以在nginx中设置拦截规则,定义正则表达式进行拦截,转发到对应的服务器上去。服务器接口访问路径:@GetMapping("/isCollection.json")public String getString(){ return "OK";}浏览器访问方式:http://ip:port/isCollection.jsonnginx配置方式:lo..原创 2020-12-24 11:13:54 · 10080 阅读 · 0 评论