草庐IT

nginx-sticky-module

全部标签

nginx代理webSocket链接,webSocket频繁断开重连

目录一、场景二、nginx代理配置三、原因四、解决一、场景1、使用nginx代理webSocket链接,消息发送和接收都是正常的,但webSocket链接会频繁断开重连2、如果不使用nginx代理则一切正常3、程序没有做webSocket心跳处理如下图二、nginx代理配置upstreamcloud_ass{ #ip_hash; server192.168.1.233:8087; server192.168.1.243:8087;}server{listen8600;server_namelocalhost;location/{roothtml;indexindex.htmlindex.htm

如何在Nginx中配置HTTP安全响应头

关于在Nginx中配置HTTP安全响应头最近在实际开发过程中,需要对项目的http响应头做一些配置,以防止各类XSS攻击、点击劫持等。这些HTTP响应头在我们部署Nginx的时候经常会被忽略掉,个人感觉这是一个比较严重的“疏忽”,加上还是很有必要的,现把用到的一些配置记录一下。1.Strict-Transport-Security(HSTS)Strict-Transport-Security(通常简称为HSTS)是一个安全功能,它告诉浏览器只能通过HTTPS访问当前资源,而不是HTTP。语法:1.strict-transport-security:max-age=2.strict-transp

Nginx 教程- 基于Docker keepalived 搭高可用

目录一、系统高可用二、Nginx的高可用1、概念1.1、KeepAlived1.2、VRRP协议1.3、NginxMaster-Slave多进程模型1.4、双机备热、多点集群Nginx+keepalived双机主从模式:Nginx+keepalived双机主主模式:Nginx+keepalived多点模式:1.5、总结:2、实战1、实践思路1.1、自定义镜像1.2、使用docker-compose打造镜像2、环境准备2.1、docker编排(docker-compose)2.2、docker编排镜像2.3、dockerfile2.4、容器启动后执行脚本2.5、高可用配置keepalived-X

Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.10

Executionfailedfortask':app:checkDebugDuplicateClasses'.>Afailureoccurredwhileexecutingcom.android.build.gradle.internal.tasks.CheckDuplicatesRunnable  >Duplicateclasskotlin.collections.jdk8.CollectionsJDK8Ktfoundinmoduleskotlin-stdlib-1.8.10(org.jetbrains.kotlin:kotlin-stdlib:1.8.10)andkotlin-stdli

一文搞懂Nginx限制上传文件大小

在nginx中,通过client_max_body_sizexxm;设置nginx服务允许用户最大上传数据在nginx中根据业务需求上传文件大小限制设置参数client_max_body_sizexxm;参数语法client_max_body_size具体的大小值,默认1m;放置位置http,server,location在主配置文件nginx.conf中的配置[root@hadoop100]#cat/application/nginx/conf/nginx.confworker_processes2;worker_cpu_affinity01011010;error_loglogs/erro

nginx埋点,按天输出日志,filebeat收集日志到elasticsearch

一、Nginx按天生成日志定义时间变量指定格式map$time_iso8601$logdate{'~^(?\d{4}-\d{2}-\d{2})'$ymd;default'date-not-found';}自定义日志json格式log_formatjson_log'{"time":"$logdate","demo1":"$arg_demo1","demo2":"$arg_demo2"}';$args$arg_name是nginx预定义变量$args可以接收请求uri后面的参数$arg_name当前请求中名为name的参数的值,而且还是未解码的原始形式的值例:http://192.168.31.1

PyCharm中解决Matplotlib绘图时AttributeError: module ‘backend_interagg‘ has no attribute ‘FigureCanvas‘问题

问题描述:利用PyCharm中Matplotlib绘图时,出现AttributeError:module‘backend_interagg’hasnoattribute'FigureCanvas’错误。问题原因及解决方法:matplotlib版本过高,需要降低matplotlib版本。注:现有matplotlib版本为3.6.0,将其降低为3.5.0pipuninstallmatplotlibpipinstallmatplotlib==3.5.0至此,问题得以解决!

Php7 在 nginx 上安装 wordpress 抛出 PHP 安装缺少 WordPress 所需的 MySQL 扩展

我该如何解决这个问题?我正在尝试在运行nginx的ubuntu16上为Php7clean安装wordpresslatest当我访问:http://blog.mysite.com/wordpress/我得到:YourPHPinstallationappearstobemissingtheMySQLextensionwhichisrequiredbyWordPress.我该如何解决这个问题? 最佳答案 只需安装必要的扩展并重启fpm进程:sudoapt-getinstallphp-mysqlndphp-mysqlisudo/etc/in

liunx查看nginx 进程

ChatGPT4.0国内站点:https://www.weijiwangluo.com/talk要查看nginx进程,可以使用以下命令:ps-ef|grepnginx这个命令会列出当前系统中所有的进程,并通过管道符号|将它们传递给grep命令进行过滤,只显示包含nginx关键字的进程。如果nginx正在运行,则会显示类似以下的输出:root12341009:00?00:00:00nginx:masterprocess/usr/sbin/nginx-gdaemonon;master_processon;www-data56781234009:00?00:00:00nginx:workerproc

解决 vue 项目开发越久 node_modules包越大的问题

vue每次编译都会将编译后的文件缓存在node_modules/.cache里面,因此需要在vue.config.js配置取消缓存compression-webpack-plugin禁止缓存constCompressionPlugin=require("compression-webpack-plugin");module.exports={plugins:[newCompressionPlugin({cache:false,//取消缓存algorithm:"gzip",filename:"[path].gz[query]",test:/\.(js|css|woff|woff2|json|tx