PCRE(Perl Compatible Regular Expressions),中文perl兼容正则表达式.bash-4.3 ~# yum -y install pcre pcre-devel bash-4.3 ~# rpm -qa | grep pcre* pcre-7.8-7.el6.x86_64 pcre-devel-7.8-7.el6.x86_64 |
bash-4.3 ~# yum -y install openssl-devel |
bash-4.3 ~# cd /usr/local/src bash-4.3 src# tar xf nginx-1.10.1.tar.gz bash-4.3 src# cd nginx-1.10.1 bash-4.3 nginx-1.10.1# useradd -M -s /sbin/nologin nginx bash-4.3 nginx-1.10.1# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module ### --user、--group: 用户和组 ### --with-http_ssl_module: 加载ssl ### --with-http_stub_status_module: nginx监控 bash-4.3 nginx-1.10.1# echo $? 0 bash-4.3 nginx-1.10.1# make bash-4.3 nginx-1.10.1# make install bash-4.3 nginx-1.10.1# echo $? 0 bash-4.3 nginx-1.10.1# /usr/local/nginx/sbin/nginx -V #查看Nginx配置参数 nginx version: nginx/1.10.1 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) built with OpenSSL 1.0.1e-fips 11 Feb 2013 TLS SNI support enabled configure arguments: --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module |
bash-4.3 nginx-1.10.1# cd /usr/local/nginx bash-4.3 nginx# ll |awk ‘NR>3 {print $NF}‘ conf #配置文件目录 html #默认网站目录 logs #日志目录 sbin #Nginx启动命令 bash-4.3 nginx# /usr/local/nginx/sbin/nginx #启动Nginx bash-4.3 nginx# lsof -i:80 #查看80端口 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME nginx 7669 root 6u IPv4 25184 0t0 TCP *:http (LISTEN) nginx 7670 nginx 6u IPv4 25184 0t0 TCP *:http (LISTEN) ### 浏览器访问服务器ip |

bash-4.3 nginx# cd html ### 浏览器访问服务器ip |

ngx_http_core_module: 包括一些核心的http参数配置,对应Nginx的配置为http区块部分.ngx_http_access_module: 访问控制模块,用来控制网站用户对Nginx的访问.ngx_http_gzip_module: 压缩模块, 对Nginx返回的数据压缩,属于性能优化模块.ngx_http_fastcgi_module: fastcgi模块和动态应用相关的模块.如php.ngx_http_proxy_module: proxy代理模块.ngx_http_upstream_module: 负载均衡模块ngx_http_rewrite_module: URL地址重写模块ngx_http_limit_conn_module: 限制用户并发连接数及请求数模块ngx_http_limit_req_module: 限制Nginx request processing rate根据定义的keyngx_http_log_module 访问日志模块,以指定的格式记录Nginx客户访问日志等信息ngx_http_auth_basic_module: Web认证模块,设置Web用户通过账号密码访问Nginxngx_http_ssl_module: ssl模块,用于加密的http连接.如httpsngx_http_stub_status_module: 记录Nginx基本访问状态信息等模块 |
本文出自 “断肠人在天涯” 博客,请务必保留此出处http://8649605.blog.51cto.com/8639605/1855602
原文:http://8649605.blog.51cto.com/8639605/1855602