让Nginx支持 SNI

2172阅读 0评论2012-03-21 tjpm
分类:LINUX

通常https链接里面服务器获取不了用户访问时使用的host值。
自从openssl 0.9.8f后openssl支持了SNI.
"OpenSSL supports SNI since 0.9.8f version if it was built with config option “--enable-tl***t”. Since OpenSSL 0.9.8j this option is enabled by default."

重新编译一下openssl,我使用的是 openssl-0.9.8u.tar.gz
./Configure linux-generic64   --prefix=/opt/openssl 
然后重新配置nginx
./configure  --prefix=/opt/taobao/nginx --with-http_ssl_module --with-http_realip_module --with-openssl=/opt/
直接编译nginx时会报错,nginx生成的objs/Makefile有错误。
根据关键字"openssl"搜索一下 grep openssl objs/Makefile 就可以发现问题所在了。
然后修改objs/Makefile重新编译即可。

上一篇:也说说rewrite
下一篇:screen简单配置