摘要:### 1、前提 系统介绍 系统A 域名: http://yhjmp.test.com 部署服务器:192.168.56.20 服务器名称:A-system 系统B 域名: http://yh.test.com或者http://yh.test.com/B-system【本文做了301永久跳转】 部署
阅读全文
摘要:### 1、前言 在web应用中,为了节省流量,降低传输数据大小,提高传输效率,常用的压缩方式一般都是gzip,今天我们来介绍另外一种更高效的压缩方式brotli。 Brotli 是基于LZ77算法的一个现代变体、霍夫曼编码和二阶上下文建模。Google软件工程师在2015年9月发布了包含通用无损数
阅读全文
摘要:### 1、创建https的ssl证书 1.1、创建秘钥 mkdir test && cd testopenssl genrsa -des3 -out server.key 2048注意:生成私钥,需要提供一个至少4位,最多1023位的密码。 1.2、生成CSR(证书签名请求) openssl re
阅读全文
摘要:问题:访问http://192.168.56.140,在浏览器返回https内容 问题产生原因:(index.html文件中配置) <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> 这个时候
阅读全文
摘要:### 1、rewrite指令语法 指令语法: rewrite regex replacement [flag]; s#regexp#replacement#g 默认值: none 应用位置: server、location、if 说明: 1) regex uri 2) rewrite是实现URL重
阅读全文
摘要:### 查看当前nginx 是否有--with-http_ssl_module模块【如果有则不需要安装】 [root@config dev-nginx-template]# nginx -V nginx version: nginx/1.16.1 built by gcc 4.8.5 2015062
阅读全文
摘要:### 访问认证主要用于企业内部人员访问的地址上,例如:企业网站后台,MySQL客户端phpmyadmin、企业内部的CRM、WIKI网站平台等。 > 创建密码认证文件并进行授权 1)创建密码文件 yum install httpd-tools -y htpasswd -bc /wx/nginx/c
阅读全文
摘要:### 1.配置方式使用root 与 alias http { ... server: { location / { root /usr/share/nginx/html; } # root配置文件下载 - 页面404 location /downloadroot { root /etc/nginx
阅读全文
摘要:1.前提【编译安装nginx】 ######安装nginx yum install -y pcre-devel openssl-devel gcc >/dev/null groupadd -g 30001 wx useradd -u 30001 -g 30001 wx tar xf /scripts
阅读全文
摘要:1.创建存放下载文件目录,传入文件 # 注释:nginx服务为yum安装 [root@nginx ~]# mkdir /etc/nginx/downloadFile [root@nginx ~]# ll /etc/nginx/downloadFile/ total 32 -rw-r--r-- 1 r
阅读全文
摘要:1.创建密码认证文件并进行授权 1)创建密码文件yum install httpd-tools -y htpasswd -bc /etc/nginx/htpasswd yiheng 123456 2)授权密码文件(属主属组与nginx启动用户一致即可) chmod 400 /etc/nginx/ht
阅读全文
摘要:1.服务器简介 Centos 7.4 nginx缓存服务器地址: 192.168.56.28 [root@nginx-cache ~] nginx前端图片服务器地址:192.168.56.30 [root@nginx-front ~] 2.nginx缓存服务器编译参数 [root@nginx-cac
阅读全文
摘要:配置nginx反向代理时遇到一个问题,当设置nginx监听80端口时转发请求没有问题。但一旦设置为监听其他端口,就一直跳转不正常; 如,访问欢迎页面时应该是重定向到登录页面,在这个重定向的过程中端口丢失了。【例: www.xxx.cn:13000/jenkins 》 www.xxx.cn/jenki
阅读全文