2008年10月17日 星期五

apache httpd.conf 擋 cgi-bin (IP)

最近部落格主機遭到 spam 攻擊,..都是從大陸的ip過來的

乾脆直接從apache 的設定檔中去擋,..

httpd.conf 中設定

cgi-bin 的部份加上

order allow,deny

allow from all

deny from 222.66.0.0/16

直接限制使用cgi-bin

看看有沒有用..

20081020修:

改了設定後發現沒有再受spam攻擊.....



2008年10月7日 星期二

顯示recent posts 文章

lifetype 模版修改..

將以下貼到 footer.template 中 或是panel.template中

<div class="sidetitle">
Recent posts</div>
<div class="side">
<ul>
{foreach from=$recentposts item=recentpost}
<li><a title="{$recentpost->getText()|truncate:100:"..."|strip_tags|escape}" href="{$url->postLink($recentpost)}">{$recentpost->getTopic()}</a></li>
{/foreach}
</ul>

</div>

就可以了