nginx
cf
这个作者很懒,什么都没留下…
展开
-
安装nginx
依赖: 1. gzip 模块需要 zlib 库 ( 下载: http://www.zlib.net/ )2. rewrite 模块需要 pcre 库 ( 下载: http://www.pcre.org/ )3. ssl 功能需要 openssl 库 ( 下载: http://www.openssl.org/ )yum install -y gcc gcc-c++原创 2017-04-08 21:13:00 · 253 阅读 · 0 评论 -
HTTP 严格传输安全(HSTS)
What is HSTS?HTTPS (HTTP encrypted with SSL or TLS) is an essential part of the measures to secure traffic to a website, making it very difficult for an attacker to intercept, modify, or fake traf原创 2017-05-22 20:27:40 · 4329 阅读 · 0 评论 -
nginx根据客户端ip动态代理后端服务-TCP
1.安装nginx1.1安装编译环境yum install -y gcc gcc-c++1.2安装依赖库1.2.1 安装openssl, ssl 功能需要 openssl 库 ( 下载: http://www.openssl.org/ )cd /usr/localwget https://www.openssl.org/source/openssl-1.0.1t原创 2017-04-20 17:29:10 · 2639 阅读 · 0 评论 -
nginx代理 tomcat获得真实用户IP
1.nginx的location中设置 header,如location /ConfigService/{proxy_read_timeout 90;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_f原创 2017-04-08 21:34:17 · 2280 阅读 · 0 评论 -
add a response header on nginx when using proxy_pass
https://github.com/openresty/headers-more-nginx-moduleDownload the latest version of the release tarball of this module from headers-more-nginx-module file list../configure \--pref原创 2017-04-08 21:26:11 · 696 阅读 · 0 评论 -
Nginx WebSocket代理配置
The WebSocket protocol is different from the HTTP protocol, but the WebSocket handshake is compatible with HTTP, using the HTTP Upgrade facility to upgrade the connection from HTTP to WebSocket. Thi转载 2017-04-08 21:24:42 · 1734 阅读 · 0 评论 -
nginx TPC 动态代理
一、Nginx版本要求Nginx-1.11.2以上,并安装stream_proxy_module和stream_map_module模块1. stream_proxy_module tcp代理需要, The ngx_stream_proxy_module module (1.9.0) allows proxying data streams over TCP, UDP (1.9.13),原创 2017-04-08 21:24:08 · 2152 阅读 · 0 评论 -
nginx SSL handshake fails on requests from mobile devices with “SSL_BYTES_TO_CIP
Go to theMozilla SSL Configuration Generator and generate a configuration for your server.Modify the file accordingly for your needs.Go to SSL labs and do a server test for your newly created原创 2017-04-08 21:22:43 · 850 阅读 · 0 评论 -
Nginx下配置Http Basic Auth保护目录
用到模块 ngx_http_auth_basic_modulehttp://nginx.org/en/docs/http/ngx_http_auth_basic_module.htmlDirectivesSyntax:auth_basic string | off;Default:auth_basic off;Context:原创 2017-04-08 21:20:45 · 932 阅读 · 0 评论 -
nginx 命令
To start nginx, run the executable file. Once nginx is started, it can be controlled by invoking the executable with the -s parameter. Use the following syntax:nginx -s signalWhere signal ma转载 2017-04-08 21:14:01 · 234 阅读 · 0 评论 -
nginx控制缓存
大家一定遇到在某些场景下 需要对特定某些文件进行缓存控制, 在使用了nginx作为代理的情况下使用nginx来控制缓存比应用服务器自己控制更加活动, 也没有在应用中去修改的侵入性需要使用到nginx的 ngx_http_headers_module:http://nginx.org/en/docs/http/ngx_http_headers_module.html原创 2017-05-22 20:30:54 · 417 阅读 · 0 评论