安装
1. 编译出错:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1 ]: *** [objs/nginx] Error 1
make: *** [build] Error 2
--with -cc-opt="-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/" \
--with -ld-opt="-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/"
要手动指定openssl和pcre库文件的位置
http:
http:
2. OpenResty是Nginx的Bundle,与官方的最新版本是同步的
Tengine则是Nginx 1.6 .2 版本的Fork, 阿里根据自己的业务情况对nginx进行了一些定制开发
3. nginx请求阶段:
1. post_read
2. server_rewrite
3. find_conf
4. http_rewrite location级别
5. post_rewrite 检测
6. preaccess
7. assess
8. post_access 根据权限进行处理
9. try_files
10. content
11. log
4. L<ngx_index> 和 L<ngx_autoindex> 模块都只会
作用于那些 URI 以 C</> 结尾的请求,例如请求 C<GET /cats/>,
而对于不以 C</> 结尾的请求则会直接忽略,
同时把处理权移交给 C<content> 阶段的下一个模块。而 L<ngx_static>
模块则刚好相反,直接忽略那些 URI 以 C</> 结尾的请求。
重新rewrite的时候、url的匹配规则会先匹配比较长的、