nginx proxy_set_header $_SERVER["HTTPS"]

with a little digging thru $_SERVER vars, it appears that nginx config of

proxy_set_header HTTPS on;

does NOT set

$_SERVER[‘HTTP’]=on

, but rather, prepends the meta key (for all proxy_set_header vars?) with "HTTP_", so that,

$_SERVER[‘HTTP_HTTPS’]=on

as I thinkg abt it, as the apache server itself is NOT serving https://, HTTPS=on would be, technically, incorrect in this scenario.

in any case, editing in,

advagg_js_cdn/advagg_js_cdn.module

– $schema = ((isset($_SERVER[‘HTTPS’]) && $_SERVER[‘HTTPS’] == ‘on’) || (isset($_SERVER[‘HTTP_X_FORWARDED_PROTO’]) && $_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’)) ? ‘https’ : ‘http’;

+ $schema = ((isset($_SERVER[‘HTTPS’]) && $_SERVER[‘HTTPS’] == ‘on’) || (isset($_SERVER[‘HTTP_X_FORWARDED_PROTO’]) && $_SERVER[‘HTTP_X_FORWARDED_PROTO’ || (isset($_SERVER[‘HTTP_HTTPS’]) && $_SERVER[‘HTTP_HTTPS’] == ‘on’)] == ‘https’)) ? ‘https’ : ‘http’;

results, correctly, in,

script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"
^^^^^

 http://drupal.org/node/1072812

一些美国机房100M testfile,用于测速之用

 VPS的网络性能,主要分出口和入口二个指标,入口可以用wget文件得到:

看下载速度,如果是11M/s,大概就是百兆口。70M/S,大概就是G口。您的VPS搭建好网站环境后,可以用其它的VPS去拽这个文件,得到出口的带宽。



芝加哥机房/100M测试

wget http://cachefly.cachefly.net/100mb.test



加州洛杉矶PR机房/1G.100M.10M测试包

wget http://www.pacificrack.com/1gb.bin

wget http://www.pacificrack.com/100mb.bin

wget http://www.pacificrack.com/10mb.bin



达拉斯SoftLayer机房/100M测试包

wget http://www.softlayer.com/downloads/test100.zip



西雅图SoftLayer机房/100M测试包

wget http://www.sea01.softlayer.com/downloads/test100.zip



拉斯维加斯/50M测试包

wget http://mirrors.versaweb.com/50meg.bin



硅谷/100M测试包

wget http://50.93.196.2/100mb.zip



directspace机房/10M.100M测试包

Portland

wget http://bandwidth.directspace.net/10MBtest.zip

wget http://bandwidth.directspace.net/100MBtest.zip

Los Angeles

wget http://174.140.171.4/10MBtest.zip

wget http://174.140.171.4/100MBtest.zip

Dallas

wget http://174.140.172.200/10MBtest.zip

wget http://174.140.172.200/100MBtest.zip



linode各机房/100M测试包

Tokyo, JP 

wget http://tokyo1.linode.com/100MB-tokyo.bin

London, UK 

wget http://london1.linode.com/100MB-london.bin

Newark, NJ 

wget http://newark1.linode.com/100MB-newark.bin

Atlanta, GA 

wget http://atlanta1.linode.com/100MB-atlanta.bin

Dallas, TX 

wget http://dallas1.linode.com/100MB-dallas.bin

Fremont, CA 

wget http://fremont1.linode.com/100MB-fremont.bin

查询IP地理信息的服务

 查询地理信息,用php的话:

1. php原生代码。缺点:性能低

2. php扩展。缺点:需要安装部署



干脆写了一个http服务,专用ip地理查询,性能很不错,20k/sec的处理速度。

ip数据基于纯真ip包,更新ip数据包后重启服务即可。



详情:http://code.google.com/p/iphttpd/

 另外的一些查询ip对应地址



http://fw.qq.com/ipaddress



http://pv.sohu.com/cityjson



http://pv.sohu.com/cityjson?ie=utf-8

防止 tunnelblick 每次自动启动。

 在 mac os x 下面每次tunnelblick都自动启动。

因为tunnelblick 都会插入一个自启动项。  

 

如果不想自动启动tunnelblick, 需要在关机,重启之前,退出tunnelblick

 

Automatically Starting Tunnelblick Upon Login

Tunnelblick was designed as a persistent menu icon that survives reboots. To this end, it inserts itself into the login items when it is started and only removes itself from the login items when you choose Quit from the menu or Command-Q from the "Details” window or "About…" window. So if you just log out, shut down, or restart your computer, or it crashes, the next time you log in, Tunnelblick will automatically start. If you do not want Tunnelblick to start automatically, quit Tunnelblick before you log out, shut down, or restart.

 

FROM:http://code.google.com/p/tunnelblick/wiki/zUsing#Automatically_Starting_Tunnelblick_Upon_Login