编译:./configure --prefix=/usr/local/nginx --add-module=../ngx-fancyindex-master 配置: location / { fancyindex on; 开启fancy索引 fancyindex_exact_size off;  不使用精确大小,使用四舍五入 fancyindex_localtime on; 使用本地时间 fancyindex_footer "myfooter.shtml"; 当前路径下的myfoote…
编译:./configure --prefix=/usr/local/nginx --add-module=../ngx_http_status_code_counter-master make && make install 配置: location /ttlsa_http_code_status/ { show_status_code_count on; } location /ttlsa_http_code_status500/ { return 500; } location /t…
1.高层的配置 worker_processes 定义了nginx对外提供web服务时的worker进程数 worker_rlimit_nofile 更改worker进程最大打开文件数量限制,如果没有配置,以系统限制2. Events模块 events { worker_connections ; multi_accept on; use epoll; } worker_connections 设置一个worker进程同时打开的最大连接数 multi_accept 告诉nginx收到一个新链接通…
nginx编译 wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz ./configure --prefix=/usr/local/nginx --add-module=../ngx_cache_purge-2.3 --with-http_stub_status_module --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_modul…
user www www; worker_processes ; error_log logs/error.log; pid logs/nginx.pid; worker_rlimit_nofile ; events { use epoll; worker_connections ; } http{ include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout ; gzip on…
vim nginx.conf http { server_tokens off;} php-fpm fastcgi.conf或fcgi.conf fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 改为fastcgi_param SERVER_SOFTWARE nginx;…
linux内核的移植性非常好, 目前的内核也支持非常多的体系结构(有20多个). 但是刚开始时, linux也只支持 intel i386 架构, 从 v1.2版开始支持 Digital Alpha, Intel x86, MIPS和SPARC(虽然支持的还不是很完善). 从 v2.0版本开始加入了对 Motorala 68K和PowerPC的官方支持, v2.2版本开始新增了 ARMS, IBM S390和UltraSPARC的支持. v2.4版本支持的体系结构数达到了15个, v2.6版本支…
一.静态资源WEB服务 1.静态资源类型:非服务器动态运行生成的文件 2.静态资源服务场景-CDN 假设静态资源存储中心在云南,用户在北京去请求一个文件,那么就会造成一个传输的延时,而如果Nginx同一把静态资源提前分发给各地区的代理,而各地区的用户直接访问本地区代理的静态资源,延时就会非常小,可以忽略不计 这里为了方便区分,把之前的auth_mod.conf 配置名改为static_server.conf 3.配置语法 : - 文件读取(除了sendfile方式外,Nginx还有--with-…
目录(?)[-] 点击List的item触发 添加其他控件以及获取item数据 ListView控件以垂直布局方式显示子view.系统的android.app.ListActivity已经实现了一个只含有一个ListView的Activity,并通过setListAdapter()方法来管理adapter.我们可以通过扩展ListActivity来实现. 我们要在整个屏幕上显示ListView,我们直接继承使用ListActivity,不需要在定义自己的layout XML文件,我们在上一学习中…
个人博客网:https://wushaopei.github.io/    (你想要这里多有) 一.nginx 原理与优化参数配置 ​ ​ master-workers 的机制的好处 首先,对于每个 worker 进程来说,独立的进程,不需要加锁,所以省掉了锁带来的开销,同时在编程以及问题查找时,也会方便很多.其次,采用独立的进程,可以让互相之间不会影响,一个进程退出后,其它进程还在工作,服务不会中断,master 进程则很快启动新的worker 进程.当然,worker 进程的异常退出,肯定是…