码迷,mamicode.com
首页 >  
搜索关键字:nginx-proxy    ( 115个结果
nginx反向代理和认证反向代理
认证反向代理server{listen443ssl;sslon;ssl_certificate/usr/local/nginx/ssl/cn.crt;ssl_certificate_key/usr/local/nginx/ssl/cn.key;server_namewww.aa.com;location/{#proxy_redirectoff;#proxy_set_headerHost$host;#proxy_set_headerX-Real-IP$remote_addr;#proxy_set_h..
分类:其他好文   时间:2016-08-06 07:04:45    阅读次数:292
nginx做为反代服务器相关配置
1、反代的模型反代服务器实现反代功能的是nginx-proxy模块虚拟服务器组实现是由upstream模块实现的大概流程是:客户端发起资源请求,反代服务器上接收后(首部和body全部接收后再发,若报文小于4k内存中缓存,大于4k先缓存在硬盘上),nginx开始解析报文(此时报文源地址是客户..
分类:其他好文   时间:2016-08-05 18:07:40    阅读次数:241
nginx常用操作
参考http://www.ttlsa.com/nginx/use-nginx-proxy/配置1.要想能记录真实IP,需要修改后端机器的日志格式,这里假设后端也是一台nginx:在后端配置文件里面加入这一段即可:log_formataccess‘$HTTP_X_REAL_IP-$remote_user[$time_local]"$request"‘‘$status$body_bytes_sent"$ht..
分类:其他好文   时间:2016-08-04 19:41:02    阅读次数:158
nginx 多盘做缓存
worker_processes8; #error_loglogs/error.log; #error_loglogs/error.lognotice; #error_loglogs/error.loginfo; #pidlogs/nginx.pid; events{ worker_connections65535; } http{ includemime.types; default_typeapplication/octet-stream; log_formatmain‘$remote_ad..
分类:其他好文   时间:2016-08-02 22:34:53    阅读次数:536
nginx + tomcat 架构中,error_page错误页面的设置
如果是单独的nginx设置404或者403等错误页面时,只需要如下即可:fastcgi_intercept_errorson; error_page404/404.html;但是,如果nginx为后台tomcat做代理时,上述方法就搞不定了,那要如何,如下:proxy_intercept_errorson;#有意思的是,这个开关默认是关闭的,所以得配..
分类:其他好文   时间:2016-07-25 16:30:19    阅读次数:244
nginx proxy X-Forwarded-For
proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;在nginx配置中,严谨一点来说这配置使用在作为代理的nginx中。通过名字就知道,X-Forwarded-For是一个扩展头。HTTP/1.1(RFC2616)协议并没有对它的定义,它最开始是由Squid这个缓存代理软件引入,用来表示HTTP请求..
分类:其他好文   时间:2016-07-17 18:14:23    阅读次数:590
nginx 1.11.0实现http和https正向代理
编译安装时候加上这个--with-http_ssl_module生成ssl证书443.crt和443.keynginx配置文件里这样写server{listen80;listen443ssl;server_name~^(.*);ssl_certificate/usr/local/nginx/conf/keys/443.crt;ssl_certificate_key/usr/local/nginx/conf/keys/443.key;location/{resolv..
分类:Web程序   时间:2016-07-01 23:08:02    阅读次数:174
Nginx Upstream timed out (110: Connection timed out)
在Nginx错误日志中,有大量的下列信息: Upstream timed out (110: Connection timed out) while reading response header from upstream 这种情况主要在厦门两种情况下发生: 1. nginx proxy 需要适当 ...
分类:其他好文   时间:2016-07-01 13:11:43    阅读次数:199
nginx报could not build theproxy_headers_hash错误,无法启动
nginx-t报警告如下:[emerg]:couldnotbuildtheproxy_headers_hash,youshouldincreaseeitherproxy_headers_hash_max_size:512orproxy_headers_hash_bucket_size:64修改nginx.conf,在http段中加如下面2行:http{ ...... proxy_headers_hash_max_size51200; proxy_headers_hash_b..
分类:其他好文   时间:2016-06-24 20:43:14    阅读次数:6539
nginx proxy优化
常用优化要点 当nginx用于反向代理时,每个客户端将使用两个连接: 一个用于响应客户端的请求,另一个用于到后端的访问; 如果机器是两核CPU,例如: 1 2 $ grep ^proces /proc/cpuinfo | wc -l 2 1 2 $ grep ^proces /proc/cpuinf ...
分类:其他好文   时间:2016-06-22 10:27:54    阅读次数:148
115条   上一页 1 ... 6 7 8 9 10 ... 12 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!