大漠知秋的加油站

  • 首页
Nginx
Nginx

Nginx 对后端无认证的服务增加 HTTP Basic authentication 认证

Nginx 配置文件增加以下配置: server { ...... auth_basic "Kibana Auth"; # 认证登录文件 auth_basic_user_file /usr/local/nginx/pwd/passwd; ...... } 安装 Apache Httpd 密码生成工具 此工具方便生成登录用户信息 $ yum install httpd-tools -y $ mkdir -p /usr/local/nginx/pwd # -c:创建新文件。-b:直接使用命令后方的密…

2020年6月4日 0条评论 521点热度 0人点赞 大漠知秋 阅读全文
Nginx

Nginx 不转发 Http Header 头信息问题

  情况就是跟前端约定自定义的 Header 头的 key 为:xxxx_xxxx 格式,注意中间的下划线,直接访问服务所在端口是可以拿到 Header 头信息,经过 Nginx 转发就拿不到了。 原 Nginx 配置 server { listen 80; server_name xxx.com; index index.html index.htm index.php; return 307 https://$host$request_uri; location / { proxy_pass http://lo…

2020年3月4日 0条评论 588点热度 0人点赞 大漠知秋 阅读全文
Nginx

在已安装的 Nginx 上追加 module

  这里以 FastDFS Nginx 模块为例。   查看原 Nginx 的配置信息 [root@host202 nginx]# ./sbin/nginx -V nginx version: nginx/1.15.1 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) built with OpenSSL 1.0.2k-fips 26 Jan 2017 TLS SNI support enabled configure arguments: --prefix=…

2019年1月3日 0条评论 1177点热度 0人点赞 大漠知秋 阅读全文
Nginx

Nginx 重定向 HTTP 到 HTTPS

server { ...... rewrite ^(.*)$ https://$host$1 permanent; 【这是 ngixn 早前的写法,现在还可以使用】 location / { ...... } } server { ...... return 301 https://$server_name$request_uri; 【这是 nginx 最新支持的写法】 location / { ...... } }

2019年1月3日 0条评论 798点热度 0人点赞 大漠知秋 阅读全文
Nginx

Nginx 处理跨域问题

常规方式 server { location / { ...... add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,…

2019年1月3日 0条评论 866点热度 0人点赞 大漠知秋 阅读全文
分类
  • C++ / 11篇
  • Develop Software / 3篇
  • Docker CE / 24篇
  • Elasticsearch / 3篇
  • FastDFS / 1篇
  • Flutter / 1篇
  • Git / 3篇
  • GitLab / 6篇
  • Golang / 21篇
  • Http Client 4.5.2 / 2篇
  • Java / 14篇
  • Kubernetes / 19篇
  • Linux / 65篇
  • Mac / 5篇
  • Maven / 1篇
  • MyBatis / 1篇
  • MySQL / 8篇
  • Nginx / 6篇
  • Rabbit MQ / 10篇
  • Redis / 1篇
  • Spring / 1篇
  • Spring Boot / 12篇
  • Spring Cloud Finchley.RELEASE / 50篇
  • Sublime / 2篇
  • Windows / 1篇
  • 吉他 / 2篇
  • 图论 / 8篇
  • 数据结构与算法 / 11篇
  • 未分类 / 1篇

COPYRIGHT © 2023 大漠知秋的加油站. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

豫ICP备16029200号-2