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. Introduction to Web Services

    What are Web Services? Web Services are client and server applications that communicate over the Wor ...

  2. jquery 异步请求Demo【转载】

    $(document).ready(function() { $.ajax({ url : "/AjaxAction/LoginArea.ashx", data : {userna ...

  3. 转:ORM框架

    转自 程序员成长之路:http://blog.csdn.net/zxc22436/article/details/6875220 对象关系映射(ORM)提供了概念性的.易于理解的模型化数据的方法.OR ...

  4. powershell利用winform批量执行tsql语句

    #加载.net的winform模块 [Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") $app= ...

  5. Linux操作系统Centos7.2版本搭建Apache+PHP+Mysql环境

    对于在校大学生来说腾讯云1元主机很划算,所以就申请了一台,打算在上面学习下linux,使用版本为centos7.2版本.在服务器上比较推荐centos,此版本生命周期较长,而且网上有关centos的教 ...

  6. SCGHR 分析思路

    -- 分析某个模块业务 a:添加表,登记表,历史表,信息表 --- (把表名搞清楚,再看具体的字段) 先搞清楚大概的数据流向,在着手具体的数据,大处布局,小处着手 b:表中的字段,以及各表直接传递什么 ...

  7. 微信小程序简易教程

    刚接触到微信小程序开发,这里做一个简单的教程: 1. 获取微信小程序的 AppID 登录 https://mp.weixin.qq.com ,就可以在网站的"设置"-"开 ...

  8. javascript获取对应页面的代码

    window.onload = function () { function getUrls(url) {//核心代码是url2这行代码,通过.replace()方法将对应的字符串替换成其他方式 va ...

  9. struts2校验器规范错误解决

    今天struts2的校验器的配置文件文件头出现了错误,配置如下: <!DOCTYPE validators PUBLIC        "-//OpenSymphony Group// ...

  10. 定时关机命令——shutdown

    通常会用到的定时关机命令有两种: Shutdown -s -t 36001小时后自己主动关机(3600秒) at 12:00 Shutdown -s 12:00自己主动关闭计算机 系统定时关机: Wi ...