本书未发布
222
nginx 与 Apache 对比
nginx: 多进程多路io复用的模型,抗压强 轻量级 负载均衡能力,反向代理
apache: 多进程同步阻塞 稳定性强,动态代理
常用模块
nginx_http_core_module 包括一些核心的http 配置
Nginx_http_access_module 访问控制模块,用来控制网站用户对Nginx的访问
nginx_http_gzip_module 压缩模块,对Nginx的返回数据压缩,属于性能优化
nginx_http_fastcgi_module fastcgi模块
nginx_http_proxy_module proxy代理模块
限流
ip的限制
rewrite模块
伪静态
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}