年归档:2013年

Varnish 配置与管理

管理varnish以及清除内存等操作虽然可以使用varnishadm,但是这里推荐使用telnet,一个交互的管理界面。

比如: telnet 127.0.0.1 6082

之后,输入help会显示所有可用命令。

help [command] ping [timestamp] status
start
stop
stats
vcl.load
vcl.inline
vcl.use
vcl.discard
vcl.list
vcl.show
param.show [-l] [] param.set
quit
purge.url
purge.hash
purge    [&&   ]...
purge.list

继续阅读

发表在 web server | 标签为 | Varnish 配置与管理已关闭评论

php aes

/**
 * aes
 *
 */
class aes{
    private $key = "wt@36";
    private $iv         = "8401948501850295"; //只能是16字节
 
    /**
     *
     ... 继续阅读

发表在 php | 标签为 , | php aes已关闭评论

关闭 Powered-By: PHP

X-Powered-By: PHP/5.x.x
可以在php.ini文件中设置:
; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header).  It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not....

继续阅读

发表在 php | 标签为 | 关闭 Powered-By: PHP已关闭评论

简单COOKIE读写

<script>
Cookie =
{
g : function(k) {return ((new RegExp(["(?:; )?",k,"=([^;]*);?"].join(""))).test(document.cookie)&&RegExp["$1"])||"";},
s : function(k,v,e,d) {document.cookie = [k,"=",v, e&&e["toGMTString"]?';expires='+e.toGMTString():"",";path=/;dom... 继续阅读

发表在 technologys | 标签为 | 简单COOKIE读写已关闭评论