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的信息.配置方式很 ...
随机推荐
- 【规律】【贪心】【数学】HDU 5573 Binary Tree
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5573 题目大意: 从1走到第k层,下一层的数是上一层的数*2或者*2+1,可以选择加上或者减去走的数 ...
- Visual Studio创建跨平台移动应用_01.Cordova&Xamarin
目前开发移动应用有三种模式:Native.Hybird.Web,若要开发跨平台的移动应用,又希望与本地API交互,那么Hybird是一个非常好的选择. 作为一个.Net程序员, ...
- 【转载】B树、B-树、B+树、B*树都是什么
1. B树 即二叉搜索树: 1.所有非叶子结点至多拥有两个儿子(Left和Right): 2.所有结点存储一个关键字: 3.非叶子结点的左指针指向小于其关键字的子树,右指针指向大于其关键字的子树: 如 ...
- test_wifi
#!/system/bin/sh #Load driver echo "ASD WIFI TESTING..." AP_NAME="default" num=0 ...
- [转] 深入剖析 linux GCC 4.4 的 STL string
本文通过研究STL源码来剖析C++中标准模板块库std::string运行机理,重点研究了其中的引用计数和Copy-On-Write技术. 平台:x86_64-redhat-linux gcc ver ...
- 【酷Q插件制作】教大家做一个简单的签到插件
酷Q插件已经有很多了,社区分享一大堆,不过还是自己写才有乐趣,哈哈.不得不吐槽一下,酷Q竟然不更新了,出了个酷Q pro,还收费!!诶.不过这也影响不了咱写插件的心情,今天教大家写一个酷Q签到插件,虽 ...
- 修改MySQL引擎
1. 显示MySQL支持的引擎:show engines;
- JNI Java调用C代码 示例
Activity public class MainActivity extends ListActivity { static { System.loadLibrary(&q ...
- python的行与缩进
#coding=utf-8#逻辑行与物理行#以下是3个物理行print "abc"print "789"print "777" #以下是1个 ...
- nginx添加缓存
nginx的具体逻辑是什么样的? 分布式session spring session redis过滤器 有4种方案: 一直访问一台 //如果这台机器垮掉了,怎么办? session同步 序列化传输 / ...