- 浏览: 568174 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (262)
- oracle (43)
- 打包 (3)
- linux (33)
- nginx (20)
- ftp (1)
- tomcat (8)
- mysql (22)
- plsql (4)
- jms (3)
- nosql (2)
- 运维监控 (5)
- 数据采集 (0)
- 测试 (2)
- jvm (5)
- 自动化数据库迁移 (2)
- 密码 (1)
- java代码 (7)
- java多线程,线程安全 (8)
- xml (1)
- spring (6)
- svn (2)
- oracle备份 (1)
- oracle 诊断 (3)
- oracle 归档 (4)
- java 虚拟机(JVM) (2)
- hibernate (5)
- activemq (2)
- http (2)
- linux_shell (9)
- python (3)
- ant (1)
- oracle rac (1)
- php (2)
- js (1)
- mongo (1)
- java 反射 (1)
- jira (1)
- 打包 maven (1)
- zabbix (2)
- lvs+keepalive (1)
- 防火墙 (1)
- memcache (2)
- redis (1)
最新评论
-
di1984HIT:
学习了~~~~
服务器大量TIME_WAIT -
springdata_spring:
可以参考最新的文档:如何在eclipse jee中检出项目并转 ...
maven常用命令 -
李小斌_2014:
我也遇到了,现在完美解决。
ORA-01422: 实际返回的行数超出请求的行数 -
啸风8023:
...
tomcat启动报错 -
fke153:
这个问题确实很坑人啊,学习了
ORA-01422: 实际返回的行数超出请求的行数
#user nobody; worker_processes 8; #error_log logs/error.log; error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; use epoll; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on; tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; #rewrite http://91.myhttp.com/(.*) http://www.myhttp.com/$1 redirect; #缓存配置 server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 500m; client_body_buffer_size 512k; proxy_connect_timeout 5; proxy_read_timeout 60; proxy_send_timeout 5; proxy_buffer_size 16k; proxy_buffers 4 64k; proxy_busy_buffers_size 128k; proxy_temp_file_write_size 128k; #注:proxy_temp_path和proxy_cache_path指定的路径必须在同一分区 proxy_temp_path /opt/App/nginx_tmp; #设置Web缓存区名称为cache_one,内存缓存空间大小为200MB,1天没有被访问的内容自动清除,硬盘缓存空间大小为30GB。 proxy_cache_path /opt/App/nginx_cache levels=1:2 keys_zone=cache_one:200m inactive=1d max_size=30g; # upstream tomcat8 { server 192.168.102.102:8080 weight=5; } upstream tomcat6 { ip_hash; server 192.168.102.100:8080 max_fails=1 fail_timeout=5s; server 192.168.102.109:8082 max_fails=1 fail_timeout=5s; } upstream tomcat16 { server 192.168.102.100:8080 max_fails=1 fail_timeout=5s; server 192.168.102.109:8082 max_fails=1 fail_timeout=5s; } upstream tomcatForJrtLot { server 192.168.102.100:8080 max_fails=1 fail_timeout=5s; } upstream tomcat9{ server 192.168.102.109:8082 ; } upstream apptest{ server 192.168.102.102:8090; } upstream tomcat10{ server 192.168.102.102:8088; } upstream tomcat1008888{ server 192.168.102.100:8888; } server { listen 8080; server_name www.myhttp.com; #charset koi8-r; #access_log logs/host.access.log main; #rewrite ^/ecai http://www.ecai8.cn/ redirect; # rewrite http://91.myhttp.com/(.*) http://www.myhttp.com/$1 redirect; # rewrite ^/upload http://wap.myhttp.com/ redirect; rewrite ^/myhttp http://www.myhttp.com/ redirect; location / { index index.html index.htm; root html; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://192.168.102.108/; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; # rewrite ^/(.*) http://www.myhttp.com/myhttp/$1 permanent; } location /s/ { alias /usr/local/nginx/s/; } location ~ .*\.(gif|jpg|png|htm|html|css|js|flv|ico|swf)(.*) { proxy_pass http://appserver; proxy_redirect off; proxy_set_header Host $host; proxy_cache cache_one; proxy_cache_valid 200 302 1h; proxy_cache_valid 301 1d; proxy_cache_valid any 1m; expires 30d; } location /ChargeCenter { index index.jsp; proxy_pass http://tomcat10/ChargeCenter; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /app { index index.jsp index.html; proxy_pass http://apptest/app; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /mgr { index index.jsp; proxy_pass http://tomcat9/mgr; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /bqs { index index.jsp; proxy_pass http://tomcat1008888/bqs; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtSubChannel { index index.jsp; proxy_pass http://tomcat16/jrtSubChannel; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /lotserver { index index.jsp; proxy_pass http://tomcat10/lotserver; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /bossclient { index index.jsp; proxy_pass http://tomcat10/bossclient; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /vipportal { proxy_pass http://tomcat9/vipportal; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /ecai { index index.jsp; proxy_pass http://tomcat6/ecai; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /qudao { index index.jsp; proxy_pass http://tomcat8/qudao; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /ussd { index index.jsp; proxy_pass http://tomcat8/ussd; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } # location /upload { # index index.jsp; # proxy_pass http://tomcat8/upload; # proxy_redirect off; # proxy_set_header Host $host; # proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # client_max_body_size 10m; # client_body_buffer_size 128k; # proxy_connect_timeout 90; # proxy_send_timeout 90; # proxy_read_timeout 90; # proxy_buffer_size 4k; # proxy_buffers 4 32k; # proxy_busy_buffers_size 64k; # proxy_temp_file_write_size 64k; # } location /yizhifu { index index.jsp; proxy_pass http://tomcat8/yizhifu; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /webimages/ { proxy_pass http://tomcat8/webimages/; charset utf-8; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /tongji { index index.jsp; proxy_pass http://tomcat6/tongji; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtNews { index index.jsp; proxy_pass http://tomcat6/jrtNews; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtRyc2 { index index.jsp; proxy_pass http://tomcat8/jrtRyc2; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtGift{ index index.jsp; proxy_pass http://tomcat6/jrtGift; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /g3cai { index index.jsp; proxy_pass http://tomcat6/g3cai; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtLot { index index.jsp; proxy_pass http://tomcat6/jrtLot; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /myhttp { index index.html; proxy_pass http://tomcat8/myhttp; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /wirelessSupport { index login.jsp; proxy_pass http://tomcat8/wirelessSupport; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtMgr { index index.html; proxy_pass http://tomcat8/jrtMgr; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtMgr2 { index index.html; proxy_pass http://tomcat6/jrtMgr2; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtLotUSSD { index webindex.jsp ; proxy_pass http://tomcat6/jrtLotUSSD; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /UMLot { index webindex.jsp ; proxy_pass http://tomcat6/UMLot; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /qiye { index webindex.jsp ; proxy_pass http://tomcat6/qiye; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } server { listen 8080; server_name www.g3cai.com; #charset koi8-r; #access_log logs/host.access.log main; location / { index index.html index.htm; root html; rewrite ^/(.*) http://www.g3cai.com/g3cai/$1 permanent; } location /webimages/ { proxy_pass http://tomcat6/webimages/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /tongji { index index.jsp; proxy_pass http://tomcat6/tongji; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /myhttp{ index index.jsp; proxy_pass http://tomcat8/myhttp; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtGift{ index index.jsp; proxy_pass http://tomcat6/jrtGift; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /g3cai { index index.jsp; proxy_pass http://tomcat8/g3cai; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtLot { index index.jsp; proxy_pass http://tomcatForJrtLot/jrtLot; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } server { listen 8080; server_name nm.myhttp.com; #charset koi8-r; #access_log logs/host.access.log main; location / { index index.html index.htm; root html; rewrite ^/(.*) http://nm.myhttp.com/ussd$1 permanent; } location /ussd { index index.html; proxy_pass http://tomcat8/ussd; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } server { listen 8080; server_name www.51500.cn; #charset koi8-r; #access_log logs/host.access.log main; rewrite ^/myhttp http://www.myhttp.com/; location / { index index.html index.htm; root html; rewrite ^/(.*) http://www.51500.cn/myhttp$1 permanent; } location /webimages/ { proxy_pass http://tomcat8/webimages/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /myhttp { index index.html; proxy_pass http://tomcat8/myhttp; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } server { listen 8080; server_name www.ecai8.cn; #charset koi8-r; # rewrite ^/ecai http://www.ecai8.cn/ redirect; #access_log logs/host.access.log main location / { index index.html index.htm; root html; rewrite ^/(.*) http://www.ecai8.cn/ecai/$1 permanent; } location /ecai { index index.jsp; proxy_pass http://tomcat6/ecai; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # server { listen 8443; server_name localhost; ssl on; ssl_certificate /usr/local/nginx/myhttp.pem; ssl_certificate_key /usr/local/nginx/myhttp.key; ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; ssl_prefer_server_ciphers on; location / { # root html; # index index.html index.htm; rewrite ^/(.*) https://www.myhttp.com/myhttp/$1 permanent; } location /jrtLot { index index.jsp; proxy_pass http://tomcatForJrtLot/jrtLot; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /jrtMgr { index index.html; proxy_pass http://tomcat6/jrtMgr; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location /myhttp { index webindex.jsp ; proxy_pass http://tomcat8/myhttp; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 8080; server_name tianya.myhttp.cn; #charset koi8-r; #access_log logs/host.access.log main; location / { index index.html index.htm; root html; rewrite ^/(.*) http://tianya.myhttp.cn/w/$1 permanent; } location /w { index wapindex.jsp; proxy_pass http://tomcat8/w; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } server { listen 8080; server_name hlxk.myhttp.com; #charset koi8-r; #access_log logs/host.access.log main; location / { index index.html index.htm; root html; rewrite ^/(.*) http://hlxk.myhttp.com/w/$1 permanent; } location /w { index wapindex.jsp; proxy_pass http://tomcat8/w; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } server { listen 8080; server_name wxcs.myhttp.com; #charset koi8-r; #access_log logs/host.access.log main; location / { index index.html index.htm; root html; rewrite ^/(.*) http://wxcs.myhttp.com/w/$1 permanent; } location /w { index wapindex.jsp; proxy_pass http://tomcat8/w; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } server { listen 8080; server_name myhttp.com *.myhttp.com; #charset koi8-r; #access_log logs/host.access.log main; rewrite ^/(.*) http://www.myhttp.com/$1 redirect; location / { index index.html index.htm; root html; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://192.168.102.108/; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } server { listen 8080; server_name myhttp.cn; #charset koi8-r; #access_log logs/host.access.log main; rewrite ^/ http://www.myhttp.com/ redirect; location / { index index.html index.htm; root html; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://192.168.102.108/; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } server { listen 8080; server_name www.myhttp.cn; #charset koi8-r; #access_log logs/host.access.log main; rewrite ^/ http://www.myhttp.com/ redirect; location / { index index.html index.htm; root html; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://192.168.102.108/; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } }
注意:如果外网端口不是80端口和nginx 的80端口映射,比如,外网的211.123.45.56 的8090与某台机器的nginx的80端口做映射,配置如下:
location /jrtLot { index index.jsp; proxy_pass http://tomcatForJrtLot/jrtLot/;#区别 proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; }
如果不加后面的/斜线,nginx日志会报302错误,并且重定向到211.123.45.56 的80端口
1、http段设置。 proxy_temp_path /home/temp_dir;设置临时目录 proxy_cache_path /home/cache levels=1:2 keys_zone=cache_one:200m inactive=1d max_size=30g;设置缓存目录为二级目录,共享内存区大小,非活动时间,最大容量,注意临时目录要跟缓存目录在同一个分区。 2、server段设置 请求静态文件设置。 proxy_cache cache_one;设置缓存共享内存区块,也就是keys_zone名称。 proxy_cache_valid 200 302 1h;设置http状态码为200,302缓存时间为1小时。 expires 30d;设置失期时间,为30天 请求动态文件设置。 proxy_pass http://appserver;不进行缓存,直接转到后端服务器。 测试:当客户端发起http请求时在服务器上会产一个缓存文件如 /home/cache/0/b9/8bd841b1c44ee5b91457eb561e44eb90
缓存清除
location ~ /purge(/.*) { #设置只允许指定的IP或IP段才可以清除URL缓存。 allow 127.0.0.1; allow 192.168.0.0/16; deny all; proxy_cache_purge cache_one $host$1$is_args$args; } 安装Purge模块,Purge模块被用来清除缓存的。
发表评论
-
nginx反向代理做cache配置
2016-04-11 10:53 1334本文抄自 [url] http://blog.sina.com ... -
nginx随机启动
2016-03-28 14:03 625#!/bin/bash # Tengine Startu ... -
据说这样并发可以到十万
2016-02-18 22:52 839一、一般来说nginx 配置文件中对优化比较有作用的为以下 ... -
502 upstream sent too big header while reading response header from upstream
2016-01-29 10:39 1434错误502 upstream sent too big h ... -
nginx用户认证配置( Basic HTTP authentication)
2015-11-26 11:49 885printf "admin:$(openssl ... -
nginx的upstream目前支持5种方式的分配
2015-09-19 00:30 843nginx的upstream目前支 ... -
nginx.conf 详解
2015-08-19 14:12 738#定义Nginx运行的用户 ... -
upstream prematurely closed connection while reading response header from upstre
2014-12-29 14:07 14934请求对方用nginx做了代理:但是error.log报 ... -
nginx concat 模块
2014-11-13 11:50 631mod_concat模块由淘宝开发,目前已经包含在teng ... -
Nginx添加模块(非覆盖安装)
2014-10-24 10:55 2362来源 http://www.linuxidc.com/ ... -
nginx 长连接
2014-07-31 14:23 8956出处: http://zhangxugg-163-com.it ... -
linux_nginx
2014-05-22 16:29 666#以下是一些反向代理的配置可删除. ... -
nginx 集群session复制
2013-08-08 16:30 8019原来写过一篇,为了加 ... -
nginx安装
2012-05-15 14:47 942wget ftp://ftp.csx.cam.ac.uk/ ... -
nginx日志分割
2012-04-05 09:39 1120脚本如下 #!/bin/bash logs_path=&q ... -
ngnix日志解析
2012-03-31 17:05 5902nginx 日志分析 # log_format ... -
nginx负载均衡设置
2011-11-24 11:03 1965nginx 的 upstream目前支持 4 种方式的分配 ... -
nginx安装重启脚本
2011-11-15 14:17 1015该文章来自http://rq2-79.iteye.com/bl ... -
Nginx+tomcat负载均衡session问题解决
2011-09-01 18:46 3870文章来源:http://hi.baidu. ...
相关推荐
Nginx 配置文件 nginx.conf 详解 Nginx 配置文件 nginx.conf 是 Nginx 服务器的核心配置文件,它控制着 Nginx 服务器的行为和性能。在这个配置文件中,我们可以设置服务器的用户和组、工作进程数、错误日志、进程...
nginx配置多个静态资源 本文将详细介绍nginx配置多个静态资源的知识点,从基本概念到配置实践,涵盖了nginx配置文件的各个组件和指令。 nginx配置文件结构 nginx配置文件主要由以下几个部分组成: * main块:...
Nginx配置文件(nginx.conf)配置详解 Nginx配置文件(nginx.conf)是Nginx服务器的核心配置文件,用于定义Nginx服务器的行为和配置。下面是Nginx配置文件的详细配置解释: 用户和组 Nginx配置文件中指定了用户和组,...
在标题“notepad++编辑nginx配置文件支持高亮”中,我们关注的是如何在Notepad++中实现对Nginx配置文件的语法高亮显示,这将极大提升开发者的阅读和编写效率。 Nginx是一款高性能的HTTP和反向代理服务器,其配置...
设置监听地址和端口,与Nginx配置中的`fastcgi_pass`对应: ```ini listen = 127.0.0.1:9000 ``` 启动Nginx和PHP-FPM服务。如果一切配置无误,现在你应该可以通过浏览器访问`http://localhost/`并看到Nginz的欢迎...
- 对于负载均衡,可以通过在Nginx配置文件中定义多个后端服务器,并使用`proxy_pass`指令来实现。 ```nginx upstream backend { server backend1.example.com; server backend2.example.com; } server { ...
在IT行业中,项目打包运行和Nginx配置是两个关键环节,它们对于应用程序的部署和发布至关重要。这里我们将深入探讨这两个主题。 首先,项目打包运行通常指的是将开发完成的前端或后端应用转换为可部署的形式。对于...
本教程将介绍一种方法,使得在Windows环境下,Nginx配置文件修改后能够自动加载并重启,以实现配置的即时生效。 首先,`nginx.conf`是Nginx的主要配置文件,它包含了服务器的各项设置,如监听端口、服务器块、反向...
3. **编辑Nginx配置文件**:找到Nginx的配置文件,通常是`/etc/nginx/nginx.conf`或`/usr/local/nginx/conf/nginx.conf`。添加一个新的`server`块,配置如下: ```nginx server { listen 80; listen 443 ssl; # ...
6. 反向代理配置:在nginx配置中,proxy_pass指令用于指定后端的服务器地址,这里指向了本地的8080端口。同时,还通过proxy_set_header指令设置了传递给后端服务器的HTTP头信息,如X-Forwarded-For(客户端IP地址)...
在部署 Vue 项目时,Nginx 配置文件 `nginx.conf` 的关键设置如下: 1. **基本配置**: - `server` 块:定义一个监听特定端口(通常是80)的服务器实例。 ```nginx server { listen 80; server_name your...
在Windows环境下,配置Nginx以支持HTTPS及在同一端口监听多个网站,即配置多个虚拟主机,是一项常见的网络服务设置任务。...同时,根据实际需求,还可以对Nginx配置进行更复杂的优化,如负载均衡、缓存等。
在Nginx配置中,我们通常使用`if`语句和`rewrite`模块来根据不同的条件重写请求。例如,若想在移动端访问时重定向到另一个域名(如***),可以利用Nginx配置文件中的`if`语句,结合正则表达式匹配HTTP_USER_AGENT,...
三、Nginx配置安全头 在上面的配置文件中,我们使用了add_header指令来添加Content-Security-Policy头,以便升级不安全的请求。这可以防止攻击者inject恶意脚本来攻击网站。 四、Nginx配置错误页面 在上面的配置...
1. **Nginx配置基础** Nginx的配置文件通常位于`/etc/nginx/`目录下,其中`nginx.conf`是主配置文件,它包含了整个Nginx服务器的基本设置。`conf.d`目录则用于存放多个独立的配置片段,这种方式使得配置管理更加...
总结一下,"squid和nginx配置正向代理访问API接口"涉及的关键知识点包括正向代理的概念、Squid和Nginx的代理功能、配置这两者的步骤、以及安全性控制和优化策略。正确配置和使用这两个工具可以帮助企业构建高效、...
本文将深入探讨如何通过Nginx配置文件来设置一级域名和二级域名,以及如何利用Nginx的反向代理功能。 首先,了解一级域名和二级域名的概念至关重要。一级域名是互联网上顶级的域名,如.com、.org、.net等。二级域名...