user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
# multi_accept on;
}

http {
include /etc/nginx/mime.types;

types_hash_max_size 2048;
server_names_hash_bucket_size 64;

access_log /var/log/nginx/access.log;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;

gzip on;
gzip_min_length 5k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 4;
gzip_types text/plain application/x-javascript text/css application/xml application/json text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";

upstream backend {
server localhost:3456 ;
server localhost:4567 ;
server localhost:5678 ;
server localhost:6789 ;
}

server {
listen 80;
server_name api.caiqr.com;

location /api {
proxy_set_header Referer "";
proxy_pass http://backend/api;
client_max_body_size 10m;
}
}

server {
#listen 80;
listen 80 default_server;
root /data/caiqiu/wapBetting/src;
index index.html index.htm;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
location /get_api_post_data/{
proxy_pass http://127.0.0.1:8888/get_api_post_data;
}
location /fragment_cache {
proxy_pass http://127.0.0.1:8888/fragment_cache;
}
location /match_data/{
proxy_pass http://127.0.0.1:8888/match_data;
}
location /match_basketball_data/{
proxy_pass http://127.0.0.1:8888/match_basketball_data;
}
}
}

nginx配置记录的更多相关文章

  1. Nginx配置记录【例1】

    A服务器,例: [root@localhost conf.d]# egrep -v "^#|^$" /etc/nginx/nginx.conf user nginx; worker ...

  2. nginx 配置记录 上传文件大小 size client

    cat nginx.conf worker_processes auto;events { worker_connections 1024;}http { include mime.types; de ...

  3. Nginx配置记录【例3】

    C服务器,例: [root@82_www_db_2 conf.d]# egrep -v "^#|^$" /etc/nginx/nginx.conf user nginx; work ...

  4. Nginx配置记录【例2】

    B服务器,例: [root@localhost conf.d]# egrep -v "^#|^$" /etc/nginx/nginx.conf user nginx; worker ...

  5. 一些NGINX配置

    一些nginx配置 使用独立目录, 然后include具体配置 gzip on for multi processers static file cache proxy pass 静态目录 or 文件 ...

  6. nginx配置反向代理或跳转出现400问题处理记录

    午休完上班后,同事说测试站点访问接口出现400 Bad Request  Request Header Or Cookie Too Large提示,心想还好是测试服务器出现问题,影响不大,不过也赶紧上 ...

  7. nginx的相关配置记录和总结

    前言 本文旨在对nginx的各项配置文件和参数做一个记录和总结. 原因是在配置框架和虚拟目录,web语言解析的nginx环境的时候遇到各种问题和参数,有时百度可以解决,有时直接复制粘贴,大都当时有些记 ...

  8. 记录一次nginx配置vhost的小bug

    话说这篇博客是在是为了保持自己记录生活的习惯而写的,没有什么阅读的价值,各位读者可以直接忽略了.今天在配置一个域名的时候,写了new_example.com(举例而已) 因为是内测,所以并未想象到深层 ...

  9. Nginx配置日志格式记录cookie

    Nginx配置日志格式记录cookie1. 一般用来做UV统计,或者获取用户token等. 配置方式:  在nginx的配置文件中有个变量:$http_cookie来获取cookie的信息.配置方式很 ...

随机推荐

  1. 【动态规划】HDU 1081 & XMU 1031 To the Max

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1081 http://acm.xmu.edu.cn/JudgeOnline/problem.php?i ...

  2. 2. Singleton模式

    这两种方法都提到了使用模版: (1) 参考文章:http://www.cnblogs.com/08shiyan/archive/2012/03/16/2399617.html 不同: a. 该方法直接 ...

  3. 如何创建WIN服务

    sc create ServiceName binPath= "XXXX.exe" displayName= "中文xxxx"binpath和displayna ...

  4. Types of AOP

    There are two distinct types of AOP: static and dynamic. The difference between them is really the p ...

  5. 《BackboneJS框架的技巧及模式》(2)

    <BackboneJS框架的技巧及模式>(2) 本文紧接第一部分:<BackboneJS框架的技巧及模式(1)> 作者:chszs,转载需注明.博客主页:http://blog ...

  6. AFNetworking (3.1.0) 源码解析 <四>

    这次主要看一下文件夹Security中的类AFSecurityPolicy----安全策略类. AFSecurityPolicy主要的作用是验证HTTPS请求证书的有效性,在iOS9之后,默认不能发送 ...

  7. AfxMessageBox和MessageBox差别

    假设用MFC的话,请尽量使用afxmessagebox,由于这个全局的对话框最安全,也最方便.   可是在WIN32 SDK的情况下仅仅能使用MESSAGEBOX. MessageBox()是Win3 ...

  8. 关于“无法解析的外部符号”和“该符号在函数_wmain 中被引用”的问题

    在VS2008和opendv的环境下: error LNK2019: 无法解析的外部符号_cvDestroyWindow,该符号在函数_wmain 中被引用 error LNK2019: 无法解析的外 ...

  9. JavaScript数组的学习

    1数组的创建 var arr1 = new Array(); var arr2=[1,2,3]; 2数组常用的方法: push,pop,shift,unshift,splice,slice,sort, ...

  10. Adding Swap Files

    Adding Swap Files If you do not have free disk space to create a swap partition and you do need to a ...