1. 实现客户端IP地址获取接口 普通版本 Nginx 的配置文件中提供了一个变量 $remote_addr 用来获取用户访问本实例时的 IP 地址,我们只要将这个变量的值返回给用户就行了(没错,就是这么简单!): location / { default_type text/plain; retu ...
分类:
其他好文 时间:
2020-07-27 13:55:16
阅读次数:
58
OpenResty 简介 OpenResty® 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库、第三方模块以及大多数的依赖项。用于方便地搭建能够处理超高并发、扩展性极高的动态 Web 应用、Web 服务和动态网关。 OpenResty 基于 Nginx ...
分类:
其他好文 时间:
2020-07-27 09:42:44
阅读次数:
84
查看kubectl services简称列表kubectl api-resources 查看ingress-nginx是否在安装 $ kubectl get pods -n ingress-nginx NAME READY STATUS RESTARTS AGE ingress-nginx-cont ...
分类:
Web程序 时间:
2020-07-26 19:30:25
阅读次数:
87
一,安装: sudo apt-get install nginx /usr/sbin/目录下是nginx命令所在目录, /etc/nginx/目录下是nginx所有的配置文件,用于配置nginx服务器以及负载均衡等信息 二,查看Nginx进程是否启动: ps -ef|grep nginx 三,启动N ...
分类:
系统相关 时间:
2020-07-26 19:22:03
阅读次数:
81
b for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details. 1.按照 ...
分类:
其他好文 时间:
2020-07-26 15:55:41
阅读次数:
180
Table of Contents generated with DocToc 一、tomcat部署的问题 二、centos服务器安装nginx 三、nginx配置 3.1 将dist文件夹上传到服务器 3.2 配置nginx.conf 3.3 启动nginx 最近因为项目需要,我要把vue-cli ...
分类:
其他好文 时间:
2020-07-26 02:06:08
阅读次数:
238
1.反向代理与负载均衡 1.nginx端口:80 2.关闭:./nginx -s stop ./nginx -s start 3.重新加载:./nginx -s reload 4.修改nginx文件配置问题: 1.在本地编辑 2.打开权限设置。(chmod 777) 3.上传。 5.输入命令 ctr ...
分类:
其他好文 时间:
2020-07-26 01:48:17
阅读次数:
84
1,yum安装的Nginx添加第三方模块支持tcp [root@centos7 ~]# nginx -V nginx version: nginx/1.16.1 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) built with OpenS ...
分类:
其他好文 时间:
2020-07-26 01:42:06
阅读次数:
77
使用ngx_http_limit_req_module限制用户访问 该模块使用的是漏斗算法来进行限制。 官方的配置示例如下: http { limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; ... server { ... loca ...
分类:
其他好文 时间:
2020-07-26 01:34:48
阅读次数:
78
[root@centos7 nginx]# hostname -i fe80::573d:3f45:8bb8:5050%ens33 192.168.0.11 [root@centos7 nginx]# [root@centos7 nginx]# cat nginx.conf worker_proce ...
分类:
其他好文 时间:
2020-07-26 01:23:14
阅读次数:
75