LJAMP: July 2008 Archives

lighttpdNginx结合使用, Nginx在前端作为反向代理, 由Apache和Lighttpd处理请求,并且记录access_log
Nginx和Lighttpd及Apache是通过lo进行数据交换的,lo中过滤出来的数据是有真实IP的。
Nginx设置
            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
Squid也可以设置相应的HTTP Header
但是,access_log中,Apache可以得到Real Remote IP, 但是Lighttpd只能得到127.0.0.1.  lvs使用Lighttpd没有这个问题
原因(来源)是:
Lighttpd开发人员认为, 所有通过X-Forwarded-For的来的IP不一定是真实的,有些可以Trust,有些不能,所以出去安全的考虑, Lighttpd在1.4.13之后添加了一个名为mod_extforward的module,并且在版本1.4.18的时候释出了一个稳定版本. mod_extforward是Apache mod_extract_forwarded的Lighttpd实现,功能雷同, 通过extforward.forwarder = ("10.0.0.232" => "trust")的表达式来标定来源安全的主机。
mod_extforward在默认的lighttpd.conf中没有写入。
mod_extforward必须在mod_accesslog之后加载。

ps:之前rinetd测试端口转发的时候发现sina后端主机严格限定了请求来源, 对非前端主机的请求报错。
Life with CPAN
CPAN on Mac OS X
Configuring Mac OS X to Install Perl Modules

MacOSX上通过CPAN安装Perl Module的关键在于..
你必须先安装一个C编译器,比如
XCode Tools,或者Inter C++ Compiler

ImageMagick在RHEL上需要先卸载原有的rpm,然后下载一份最新的source包
./configure
make
make install之后
在/path/tp/ImageMagick/src下的PerlMagick下执行
perl Makefile.PL
make
make test
make install
--EOF--

关于这个存档

This page is a archive of entries in the LJAMP category from July 2008.

LJAMP: June 2008 is the previous archive.

LJAMP: August 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.