ITeye博客

nginx

共 5 篇文章

nginx根据COOKIE信息重定向URL并将COOKIE转换为QUERYSTRING

location /{ set $ody_cookie ""; if ($http_cookie ~* "ody_ab_gray_group=(.*)"){ set $ody_cookie "ody_ab_gray_group=$1"; } if ($query_string ~* "^\?.*"){ rewrite ^(.*) ^$1&$ody_cookie break; } if ($query_string !~ "^\?.*"){ rewrite ^(.*) ^$1?$ody_cookie break; } proxy_pass http://localhost:8080; prox…

2017-10-17 18:13 · linux · nginx

域名绑定在nginx上反代tomcat之shiro过滤器上下文处理

域名绑在nginx上,又反代了tomcat 又想以域名直接访问web应用 shiro在处理过程中,用了如下代码 public final void renderMergedOutputModel(Map model, HttpServletRequest request, HttpServletResponse response) throws IOException { StringBuilder targetUrl = new StringBuilder(); if(this.contextRelative && this.getUrl().startsWith("/")) { targ…

2017-02-10 19:02 · java · tomcat · nginx · shiro

Nginx1.9+Tomcat8+Spring4+Shiro-redis2.4.2.1搭建HA Cluster

nginx配置(nginx.conf) #服务进程数量,一般等于CPU数量 worker_processes 1; error_log /save/savefe-nginx-logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { #epoll是多路复用IO(I/O Multiplexing)中的一种方式,但是仅用于linux2.6以上内核,可以大大提高nginx的性能.Linux建议使用epoll,FreeBSD建议使用kqu…

2016-02-01 12:54 · java · spring · nginx · shiro · redis

openssl genrsa

介绍 openssl genrsa 用于生成rsa私钥文件,生成是可以指定私钥长度和密码保护。 语法 openssl genrsa [ -out filename ] [ -passout arg ] [ -des ] [ -des3 ] [ -idea ] [ -f4 ] [ -3 ] [ -rand file(s) ] [ -engine id ] [ numbits ] 一般使用 E:\OpenSSL\foo>openssl genrsa -out rsa_pri.pme Loading 'screen' into random state - done Generating RSA …

2015-10-08 13:23 · linux · nginx

nginx启用https 443

一、安装nginx并启用ssl模块 before svn checkout http://nginx-upstream-jvm-route.googlecode.com/svn/trunk/ /root/dev/nginx-upstream-jvm-route-read-only patch -p0 < /root/dev/nginx-upstream-jvm-route-read-only/jvm_route.patch ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_…

2015-09-12 11:19 · linux · nginx