Jun
11
2008
How to install FDT?
1. Install Eclipse (www.eclipse.org)
2. Open Eclipse
3. Select "Help->Software Updates->Find and install..."
4. Select "Search for new features to install" and press next
5. Press "New Remote Site..."
6. Insert FDT into Name and "http://fdt.powerflasher.com/update/" into URL
7. Press finish
If you get an ERROR 403 you are perhaps behind a proxy.
1. Preferences...
2. Select Install/Update
3. Select "Enable http proxy connection"
4. Insert proxy address and port
5. try again
Tags: Flash FDT
Jun
9
2008
最近发现好多好东西都在FS2YOU才有的下,但需要安装它那该死的客户端,并且有一个叫peer.exe的进程偷偷的上传文件
在网上搜了一下几种方法突破它的下载限制,希望能有点用。
方法1:无聊中发现FS2YOU网盘的地址还是能从源文件中找到地址的
以ISO为例,打开源文件后,按CTRL+F,调出搜索窗口,输入ISO[按文件类型而定],找到以“
http://cachefile”开头,以.ISO结尾,这个便是文件的地址了
方法2:下载一个的Firefox,用这个软件直接打开下载地址,就可以使用其它下载工具进行下载,而不需要安装插件。
方法3:利用万能的JS (推荐)
Quote:javascript:window.setTimeout=null;showDirectDownload()
找到下载网页后,在浏览器地址栏复制以上语句,然后enter~就可以华丽的用工具下了
方法4:这是我本人自己发现的哦,就是你安装FS2YOU客户端后,在删除.以后就可以HTTP下载 了!!
方法5:你在点下载的时候,会出现客户端的东西,直接点取消,关闭,回到刚才的下载页面,就多出一个下载地址,用迅雷直接可上1M的速度,当然部分地址出现盗链严重的情况,还是只有用他的软件才可以下下来!
Jun
8
2008
Apache下可以通过cronolog来切割日志,Nginx下怎么实现这个功能呢?
由于nginx的配置文件不支持cronolog的管道,只好通过手动的方式来截取生成每天的各网站日志。
在nginx.conf中定义log:
在http{}内定义log格式:
log_format combined '$remote_addr - $remote_user [$time_local] '
'"$request" $status $apache_bytes_sent '
'"$http_referer" "$http_user_agent"';
log_format表示log格式,combined表示定义的格式名称,后面表示格式样式。
在server{}内定义日志文件的位置和相应的格式:
access_log /data/weblogs/www1_access.log combined;
nginx可接受的信号如下:
Signal Action
TERM, INT Terminate the server immediately
QUIT Stop the server
HUP Configuration changes, start new workers, graceful stop of old workers
USR1 Reopen log files
USR2 Upgrade the server executable
WINCH Graceful Stop (parent process advise the children to exit)
kill -HUP pid 重新应用配置文件
kill -USR1 pid 重新刷新log
通过如下方式达到日志轮询的目的:
# vi logcron.sh
log_dir="/data/weblogs"
date_dir=`date +%Y/%m/%d/%H`
/bin/mkdir -p ${log_dir}/${date_dir} > /dev/null 2>&1
/bin/mv ${log_dir}/access.log ${log_dir}/${date_dir}/access.log
kill -USR1 `cat /opt/nginx/logs/nginx.pid`
定义一个cron,在每天晚上23:59:50执行这个脚本
Tags: nginx cronolog
Jun
8
2008
在apache httpd.conf中的写法:
RewriteEngine On
RewriteRule /index_([^/]*).html /templete1/index\.php\?itemID=$1 [L]
RewriteRule /doc_([^/]*).html /goDoc\.php\?docID=$1 [L]
在nginx.conf中的写法:
rewrite "/index_([^/]*).html" /templete1/index.php?itemID=$1 last;
rewrite "/doc_([^/]*).html" /goDoc.php?docID=$1 last;
rewrite "/aboutMe" /aboutMe.php last;
rewrite "userReg" /userReg.php last;
Tags: nginx Apache rewrite
Jun
8
2008
限制每个IP一个线程,每个线程30K/s限制;
防治盗链,将盗链的URL显示为指定图片;
在171上测试通过。
一、下载限制。
http {
limit_zone one $binary_remote_addr 10m;
server {
location /upload/ {
limit_conn one 1;
limit_rate 30k;
}
}
}
参考:http://wiki.codemongers.com/NginxHttpLimitZoneModule
Tags: nginx 连接限制
Jun
8
2008
方法1:直接配置nginx.conflocation /img/ {
root /data/;
valid_referers none blocked server_names *.sohu.com sohu.com ;
if ($invalid_referer) {
rewrite ^/
http://www.sohu.com/images/error.gif #return 403;
}
}
方法2:利用 nginx 的第三方模块 ngx_http_accesskey_module 来实现下载文件的防盗链
description:
比如我的 download 目录下有一个 file.zip 的文件。对应的URI 是http://example.com/download/file.zip
而且 key 值是根据用户的 Ip 有关的,这样就可以避免被盗链了。
安装模块方法
解压,然后在编译nginx的时候加上:
./configure --addon-module=path/to/nginx-accesskey
配置方法
需要在nginx的配置文件里面添加
location /download {
accesskey on;
accesskey_hashmethod md5;
accesskey_arg "key";
accesskey_signature "mypass$remote_addr";
}
语法:
accesskey [on|off]
默认是off。
用 on 开启这个功能。
accesskey_arg "string"
如果使用 accesskey_arg "string"
accesskey_hashmethod [md5|sha1]
默认是 md5.
这里是选择哈希的类型。随便用哪个都可以。不过在生成下载 uri 的时候需要使用相应的哈希方法。
accesskey_signature "string"
默认是accesskey_signature "$remote_addr"
这里是被签名(哈希)的字符串。
$remote_addr 表示用户的 ip。
为了很好的防盗链,这里应该给用户ip加上噪声。让别人无法猜到。
比如accesskey_signature " myPassWord $remote_addr"
生成下载URI 的方法。
假设
location /download {
accesskey on;
accesskey_hashmethod md5;
accesskey_arg "key";
accesskey_signature "mypass$remote_addr";
}
Php:
参考文献: http://wiki.codemongers.com/NginxHttpAccessKeyModule
Tags: nginx 防盗链