#user  nobody;
worker_processes ; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections ;
} 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 ;
keepalive_timeout ; ####################################begin###################################################
#gzip on;
## gzip on;
## gzip_http_version 1.1;
## gzip_comp_level ;
## gzip_types text/plain text/html text/css
## application/x-javascript text/xml
## application/xml application/xml+rss
## text/javascript;
#####################################################end#################################### server {
listen ;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / {
root html;
index index.html index.htm;
} error_page /.html; # redirect server error pages to the static page /50x.html
#
error_page /50x.html;
location = /50x.html {
root html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:
#
location ~ \.asp$ {
proxy_pass http://10.1.78.12:8080;
}
location ~ \.php$ {
proxy_pass http://10.1.78.12:8090;
proxy_set_header X-Forwarded-For $remote_addr;
} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:;
# 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 ;
# listen somename:;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen 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配置说明的更多相关文章

  1. 很详细的Nginx配置说明

    这篇文章主要为大家分享了一篇很详细的Nginx配置说明,主要内容包括Nginx常用功能.Nginx配置文件结构,想要了解Nginx配置的朋友不要错过,参考一下   Nginx是lgor Sysoev为 ...

  2. nginx 配置说明及优化

    一.配置说明 1.  worker_processes 8; nginx 进程数,建议按照cpu 数目来指定,一般为它的倍数 (如,2个四核的cpu计为8). 2.  worker_cpu_affin ...

  3. nginx 配置说明

    ======nginx 配置文件分开==== http://blog.csdn.net/baple/article/details/44197981 1.备份现在有nginx.conf2.复制ngin ...

  4. Nginx基本配置

    1.Nginx官网下载安装程序,http://nginx.org/ 2.启动命令 启动:start nginx.exe停止:nginx -s stop 重新加载: nginx -s reload 3. ...

  5. 【转载】nginx 并发数问题思考:worker_connections,worker_processes与 max clients

    注:这个文章主要是作者一直在研究nginx作为http server和反向代理服务器时候所谓最大的max_clients和 worker_connections的计算公式, 其实最后的结论也没有卡上公 ...

  6. nginx 并发数问题思考:worker_connections,worker_processes与 max clients

    我相信,很多人都跟我一样,看书都不会太细致也不太认真思考,感觉书中讲的东西都应该是对的,最近读书时我发现以前认为理所当然的东西事实上压根都没有弄明白,最终的结果是,书是别人的,书中的知识也是别人的. ...

  7. 转载:负载均衡器技术Nginx和F5的优缺点对比

    https://blog.csdn.net/zxc456733/article/details/78861100 nginx(一) nginx详解 nginx是一个被广泛使用的集群架构组件,我们有必要 ...

  8. windows环境vagrant修改静态资源文件,centos虚拟机中nginx的web环境下不生效

    最近上手krpano,本地修改了krpano.html文件或者xml文件,在虚拟机环境打开文件是修改过来了,在nginx中就是不生效. 修改nginx.conf中http{}中的 sendfile  ...

  9. 部署Nginx

    部署Nginx #下载nginx wget http://nginx.org/download/nginx-1.12.2.tar.gz#安装依赖 yum install pcre-devel open ...

随机推荐

  1. APP store 上架过程中碰到的那些坑&被拒的各种奇葩原因整理&审核指南中文版

    苹果官方发布的十大常见被拒原因 1.崩溃次数和Bug数量.苹果要求开发者在将应用提交给App Store之前彻查自己的应用,以尽量避免Bug的存在. 2.链或错误的链接.应用中所有的链接必须是真实且有 ...

  2. SharePoint 2013 开发——SharePoint Designer 2013工作流

    博客地址:http://blog.csdn.net/FoxDave SharePoint Designer 2013为开发者和高级用户提供了两种创建定制工作流的模式: 基于文本的设计器--即我们一直 ...

  3. poj2129 dp

    //Accepted 320 KB 47 ms //dp //dp[i][j]=1 表示用s1的前i个,s2的前j个字符能构成s3的前i+j-1个字符 //dp[i][j]=0 表示构不成 //dp[ ...

  4. Hash索引和B树索引

    要知道磁盘结构优化访问的关键在于以block为单位(比如每次读取一个页面) 这两种索引差别也就在聚集到一个block的标准: B树聚集到一个block是因为关键字在一个范围内,关键字在block内的排 ...

  5. 嵌入式 -- WINKHUB 边信道攻击 (NAND Glitch)

    0x00 前言 随着物联网IOT的飞速发展,各类嵌入式设备, 路由器安全研究也越来越火. 但因为跟以往纯软件安全研究的要求不同, 这类研究往往需要结合相应的硬件知识. 很多朋友困惑如何开始, 甚至卡在 ...

  6. Net作业调度-----Quartz.Net

    一:业务需求: 项目需要在不同时刻,执行一个或很多个不同的作业. Windows执行计划这时并不能很好的满足需求了,迫切需要一个更为强大,方便管理,集群部署的作业调度框架. 二:介绍 Quartz一个 ...

  7. HDU 5253 最小生成树(kruskal)+ 并查集

    题目链接 #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> ...

  8. Piggy-Bank_完全背包

    Description Before ACM can do anything, a budget must be prepared and the necessary financial suppor ...

  9. HDU 5040

    http://acm.hdu.edu.cn/showproblem.php?pid=5040 题意比较难懂,有摄像头的位置是可以走的,每回合开始看做人先走摄像头再转,也就是说如果你这回合走之前没有摄像 ...

  10. 制作部署安装包:Inno Setup

    制作部署安装包:Inno Setup 前一篇尝试Office 2003 VSTO的开发.部署有提到用VS开发一个简单的VSTO程序.打包C/S程序,我首先想到的是VS里自带的Setup Project ...