Monday, February 7, 2011
Wednesday, January 26, 2011
Kohana 3 - .htaccess that Works on DreamHost
I’m currently hosting my sites on DreamHost because … well let me just put it this way: we’re both cheap. It works out. But what doesn’t work out are the default .htaccess rules that come bundled with Kohana. So to fix this, swap the line [cci lang="apache"]RewriteRule .* index.php/$0 [PT][/cci] found in your .htaccess with one of the following options:
[cc lang="text"]# Option 1
RewriteRule .* index.php?/$0 [PT,L,QSA]
# Option 2
RewriteRule .* index.php?kohana_uri=$0 [PT,L,QSA][/cc]
[cc lang="text"]# Option 1
RewriteRule .* index.php?/$0 [PT,L,QSA]
# Option 2
RewriteRule .* index.php?kohana_uri=$0 [PT,L,QSA][/cc]
Monday, January 24, 2011
AMQP+PHP架构
高级消息传输在未来的WEB架构必将是必备组件,对于各个应用之间的集成非常合适。
http://www.rabbitmq.com/how.html
http://cn.php.net/manual/en/book.amqp.php
https://github.com/tnc/php-amqplib
http://www.rabbitmq.com/how.html
http://cn.php.net/manual/en/book.amqp.php
https://github.com/tnc/php-amqplib
Friday, January 21, 2011
Dreamhost PS upgrade
如果在升级Dreamhost的VPS时候遇到问题,大部分是因为 ndn-megacli 这个包不能升级,以下是解决方法
[cc lang="text"]rm -f /etc/init.d/ndn-megacli
dpkg -P --force-all ndn-megacli
apt-get install ndn-megacli[/cc]
[cc lang="text"]rm -f /etc/init.d/ndn-megacli
dpkg -P --force-all ndn-megacli
apt-get install ndn-megacli[/cc]
Wednesday, December 29, 2010
vim tab 快捷键配置
[cc lang="text"]
map th :tabnext
map tl :tabprev
map tn :tabnew
map td :tabclose[/cc]
map th :tabnext
map tl :tabprev
map tn :tabnew
map td :tabclose
Wednesday, December 22, 2010
Nginx上ETag支持
[cc lang="text"]
location ~* ^.+.(gif|jpg|css|js|png)$ {
root /var/web/static;
FileETag on;
etag_format \"%X%X\";
add_header Cache-Control max-age=0;
}
[/cc]
这样就可以返回304啦。
location ~* ^.+.(gif|jpg|css|js|png)$ {
root /var/web/static;
FileETag on;
etag_format \"%X%X\";
add_header Cache-Control max-age=0;
}
[/cc]
这样就可以返回304啦。
Subscribe to:
Posts (Atom)