nginx.conf
#user  nobody;
worker_processes  4; #nginx进程数,建议设置为等于CPU总核心数
#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; #单个进程最大连接数(最大连接数=连接数*进程数)
}
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;
#服务器集群名称为Jq_one
    upstream Jq_one {
	server  127.0.0.1:8061; 
	server  127.0.0.1:8060; 
        hash   $cookie_jsessionid;
    }
server {
        listen       8083;
        server_name  localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
            root   html;
            index  Default.aspx Default.html Default.htm;
	    #指向集群名称为Jq_one
	    proxy_pass         http://Jq_one; 
	    #设置主机头和客户端真实地址,以便服务器获取客户端真实IP
	    proxy_set_header   Host             $host; 
	    proxy_set_header   X-Real-IP        $remote_addr; 
	    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        }
#静态资源缓存设置
	location ~\.(jpg|png|jpeg|bmp|gif|swf|css)$
        { 
            expires 30d;
            root /nginx_iis/nginx-1.9.3/html;#root:
            break;
        }
#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;
        #}
    }
# 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       443 ssl;
    #    server_name  localhost;
#    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;
#    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;
#    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;
#    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
}
nginx.conf的更多相关文章
- Nginx配置文件nginx.conf中文详解(转)
		######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_ ... 
- <nginx.conf> nginx用户权限
		Nginx用户权限 在nginx.conf文件的第一行一般是设置用户的地方(编译安装nginx时的参数--user=<user>也是指定用户的地方),如 user www www; 如不指 ... 
- CentOS下配置nginx conf/koi-win为同一文件的各类错误
		今天配置CentOS6.5下安装Nginx + php7 + mysql5.7.15遇到了一些坑.本来家里的电脑在配置环境的时候没有问题,拿去公司的电脑上就是到处报错.不知道是不是人品问题.今晚在家重 ... 
- nginx.conf中配置laravel框架站点
		nginx.conf配置如下: user nginx nginx;worker_processes 4; error_log logs/error.log error; pid logs/nginx. ... 
- nginx.conf配置文件里的upstream加入健康检查
		查看NGINX启用了那些模块: # ./nginx -V Tengine version: Tengine/ (nginx/) built by gcc (Red Hat -) (GCC) TLS S ... 
- nginx.conf 解释
		http://snapshot.sogoucdn.com/websnapshot?ie=utf8&url=http%3A%2F%2Fwww.cszhi.com%2F20120513%2Fngi ... 
- Nginx配置文件(nginx.conf)配置详解(2)
		Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ... 
- Nginx的nginx.conf配置文件中文注释说明
		#运行用户 user www-data; #启动进程,通常设置成和cpu的数量相等 worker_processes 1; #全局错误日志及PID文件 erro ... 
- nginx.conf详解
		##定义nginx运行的用户各用户组user nginx nginx; ##nginx进程数,建议设置与cpu核心数一致worker_processes 1; #为每个进程分配CPU的工作内核 wor ... 
- nginx.conf各参数的意义
		搬运+翻译至 http://qiita.com/syou007/items/3e2d410bbe65a364b603 /etc/nginx/nginx.conf 记录各个参数的意义 user user ... 
随机推荐
- 浅谈算法和数据结构: 十 平衡查找树之B树
			前面讲解了平衡查找树中的2-3树以及其实现红黑树.2-3树种,一个节点最多有2个key,而红黑树则使用染色的方式来标识这两个key. 维基百科对B树的定义为“在计算机科学中,B树(B-tree)是一种 ... 
- Alljoyn之管中窥豹
			Alljoyn之管中窥豹 一.历史: Alljoyn是高通2011年推出的近距离P2P通讯技术,它为分布式应用程序在不同设备中提供了运行环境,特别是移动性.安全性和动态配置,支持Microsoft W ... 
- Win7&Ubuntu12.04 双系统引导问题
			周末的时候手贱,重装系统,导致原来的ubuntu12.04和win7双系统的引导不见了,所以在此进行一下说明,如何修复. 1. win7和ubuntu12.04双系统引导修复 问题描述: 在重装 ... 
- 分享一个css3写的气泡对话框,适合于即时通讯和留言本的动态内容
			效果预览: css code .message_content{width:100%;margin-top:10px;clear:both;float:left;} .face{float:left; ... 
- PHP fsockopen 异步调用接口在nginx上偶尔实效的情况
			private function fsock_asy_do($get){ $fp = fsockopen("ssl://www.xxx.com", 443, $errno, $er ... 
- Linux Hadoop2.7.3 安装(单机模式) 二
			Linux Hadoop2.7.3 安装(单机模式) 一 Linux Hadoop2.7.3 安装(单机模式) 二 YARN是Hadoop 2.0中的资源管理系统,它的基本设计思想是将MRv1中的Jo ... 
- Hexo的Next主题配置
			使用Next主题 在这里Downloads Next主题代码 将下载的代码放在myBlog/next目录下 设置站点myBlog/_config.yml的theme字段值为next 生成新页面hexo ... 
- 每天多一点(2016.12.04)》Javascript隐式转换
			乱想 javascript为什么需要隐式转换?如果没有会出现什么情况? 找了一圈没有看到关于这个的讨论,只好自己研究了,可能不一定正确,自行辨知. 郁闷就是郁闷在好好的,为什么要搞个隐式转换,一般来讲 ... 
- 实战MEF(1):一种不错的扩展方式
			在过去,我们完成一套应用程序后,如果后面对其功能进行了扩展或修整,往往需要重新编译代码生成新的应用程序,然后再覆盖原来的程序.这样的扩展方式对于较小的或者不经常扩展和更新的应用程序来说是可以接受的,而 ... 
- 【转】WPF DataGrid 获取选中的当前行某列值
			方法一:DataRowView mySelectedElement = (DataRowView)dataGrid1.SelectedItem; string result = mySelectedE ... 
