nginx配置记录
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配置记录的更多相关文章
- Nginx配置记录【例1】
A服务器,例: [root@localhost conf.d]# egrep -v "^#|^$" /etc/nginx/nginx.conf user nginx; worker ...
- nginx 配置记录 上传文件大小 size client
cat nginx.conf worker_processes auto;events { worker_connections 1024;}http { include mime.types; de ...
- Nginx配置记录【例3】
C服务器,例: [root@82_www_db_2 conf.d]# egrep -v "^#|^$" /etc/nginx/nginx.conf user nginx; work ...
- Nginx配置记录【例2】
B服务器,例: [root@localhost conf.d]# egrep -v "^#|^$" /etc/nginx/nginx.conf user nginx; worker ...
- 一些NGINX配置
一些nginx配置 使用独立目录, 然后include具体配置 gzip on for multi processers static file cache proxy pass 静态目录 or 文件 ...
- nginx配置反向代理或跳转出现400问题处理记录
午休完上班后,同事说测试站点访问接口出现400 Bad Request Request Header Or Cookie Too Large提示,心想还好是测试服务器出现问题,影响不大,不过也赶紧上 ...
- nginx的相关配置记录和总结
前言 本文旨在对nginx的各项配置文件和参数做一个记录和总结. 原因是在配置框架和虚拟目录,web语言解析的nginx环境的时候遇到各种问题和参数,有时百度可以解决,有时直接复制粘贴,大都当时有些记 ...
- 记录一次nginx配置vhost的小bug
话说这篇博客是在是为了保持自己记录生活的习惯而写的,没有什么阅读的价值,各位读者可以直接忽略了.今天在配置一个域名的时候,写了new_example.com(举例而已) 因为是内测,所以并未想象到深层 ...
- Nginx配置日志格式记录cookie
Nginx配置日志格式记录cookie1. 一般用来做UV统计,或者获取用户token等. 配置方式: 在nginx的配置文件中有个变量:$http_cookie来获取cookie的信息.配置方式很 ...
随机推荐
- Nodejs in Visual Studio Code 05.Swig+Bootstrap
1. 开始 准备好Express+Swig的练习代码:https://github.com/Mengkzhaoyun/nodepractise 准备好AdminLTE后台管理模版:https://ww ...
- 在Visual Studio中使用AStyle
最近在做一个C++项目,我们使用了一个叫做AStyle的插件来做代码格式化. 下载方式1:通过Visual Studio下载 启动Visual Studio,以下简称VS: 英文版VS:VS主菜单 & ...
- 实现字符串匹配的KMP算法
KMP算法是Knuth-Morris-Pratt算法的简称,它主要用于解决在一个长字符串S中匹配一个较短字符串s. 首先我们从整体来把我这个算法的思想. 字符串匹配的朴素算法: 我们容易想到朴素算法, ...
- Java 8 中新的 Date 和 Time 类入门详解
这篇文章主要是java8中新的Date和Time API的实战.新的Date和Time类是java开发者社区千呼万唤始出来的.Java8 之前存在的Date类一直都受人诟病,很多人都会选择使用第三方的 ...
- jquery width(), innerWidth(), outerWidth() 区别
#div1 { width: 100px; height: 100px; border: 5px black solid; padding: 10px; margin: 10px; backgroun ...
- UGUI的9个重要回调函数
using UnityEngine; using System.Collections; using UnityEngine.EventSystems; //句柄 public class Butto ...
- 转载:c++内存泄露机制
对于一个c/c++程序猿来说,内存泄漏是一个常见的也是令人头疼的问题.已经有很多技术被研究出来以应对这个问题,比方 Smart Pointer,Garbage Collection等.Smart Po ...
- css06背景图片
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- (转)java 23种设计模式
设计模式(Design Patterns) ——可复用面向对象软件的基础 设计模式(Design pattern)是一套被反复使用.多数人知晓的.经过分类编目的.代码设计经验的总结.使用设计模式是为了 ...
- 执行oracle函数的四种方法
1.在定义函数时:如果有参数,则参数可有类型但是不加长度. 2.在执行函数: var/variable var_name var_type(如果数据类型是number则没有长度,如果数据类型是varc ...