Dennis' Blog of Indiscriminate | I thought what I’d do was, I’d pretend I was one of those deaf-mutes

Archive for August 2008

Aug/08

15

Wordpress URL REWRITE on LIGHTTPD

I’ve tried to use wordpress with lighttpd, and search around for how to do the url-rewrite.

I’ve tried to compare different url-rewrite

, Hide

網摘: 教育的諷刺 香港的悲哀 « 有涯小札.

不論社會如何富裕,始終是個物競天擇、適者生存的世界。社會資源有限,所以除非我們實施像芬蘭那樣的教育制度,否則在每個階段都要有人被淘汰,此乃社會現 實。但是,這些被社會遺棄的人,通常是他們先遺棄了自己。當學生每一次決定以玩樂來取代溫習時,他們就已經舖好了今日的路,決定了今日到處叩門的結果。當 家長每一次出面替子女解決一個問題時,也就等於告訴子女:做錯事不要緊,有人會出來替你收拾。此乃「溫水煮蛙」,到出了事再來後悔,已經於事無補。

, , Hide

Aug/08

13

我收到了妳的 msn

回到家,打開好幾天都沒有開過的 MSN

我立即收到了妳的 msn

看到妳的名字出現,很突然。大概心又被動了一下吧。

可是我未看內容都能立即知道,那不是由妳發出來的,那是 spam / virus。

打開來確認一下,果然如此。

可是為何明知道那是 spam 的連結還會按下去?為何好幾小時到現在都不曾想過要關掉那個對話視窗?

No tags Hide

r00tshell.com » Blog Archive » Wordpress – Lighttpd – Permalinks – Without rewrite.

1. 在 lighthttpd 的 config file 當中 wordpress 的部份 (vhost 或 subolder) 加上

server.error-handler-404 = "<your_wordpress_root>/index.php"

2. 修正一下你的 theme 的 404.php

在第一行加上

< ?php header('HTTP/1.1 404 Not Found');?>

如果你是用 CGI / FASTCGI 設定的話就是

< ?php header('Status: 404 Not Found',false,404);?>

總共才不過兩佪 file 兩行而已,而且執行起來的效率很高。

不但語意上簡單而正確,也能使用顯示自訂的 wordpress 404 頁面。

如果配合 rewrite 的話也可以更一步減少 server 執行 stat() 檢查檔案是否存在而作出的 IO operation

, , Hide

Aug/08

13

本 Blog 轉移更新昇級修理

已經接近完成,大約90%

轉移了 server

更新了 theme

昇級了 wordpress

修理了有問題的超連結

Hide

Linux 近年很多設定改變了也不知道

很久以前用 RedHat 6, RedHat 7, Mandrava, Fedora Core, Ubuntu 到  Gentoo, CentOS 再走到最近接觸的 ArchLinux

倒如是 SCSI emu layer for PATA/SATA 變成了主流,舊式的 /dev/hda IDE device 都被 /dev/sda 取替了。也有部份設定檔的位置和內容改動了,和我記憶中的概念有一點出入。

一般常見的 Linux 發佈版本也比以前變得更大了,也有更多你不需要也不想要的套件都放在一起難以移除。

花了好幾天,連續試了很多個不同的最近最流行版本之後,它們都令我失望,簡單來說,就是太大太多了。記得以前一套 Linux 只需一片 CD;現在卻居然連雙 DVD 版本也推出了。其實我只是想要一套簡單的 LLMP(不是 LAMP…) 而已,為甚麼都給我 KDE, Gnome, mail server, file server, ftp server, proxy server, software router, 繞錄程式, rsh, gcc, IDE, 一式四份的文檔 editor, Photo Editor, Office, IPV6 支持, 多媒體播放器, Browser, Mail Client, Clustering, 不同的管理工具,管理不同工具的工具, 數以百萬計的不同格式的文件, Source code….還有更多數不清的,也不知道可以用來做甚麼的套件;這根本比 MacOS 還有 Windows XP 來得過份!!!在快要放棄之前,最後根據 wikpedia 找了沒看過沒聽說過的 ArchLinux 來試,想不到居然一怕即合!

Simple

Many GNU/Linux distributions define themselves as “simple”. However, simplicity itself has many definitions.

Arch Linux defines simplicity as a lightweight base structure without unnecessary additions, modifications, or complications, that allows an individual user to shape the system according to their own needs. In short; an elegant, minimalist approach.

A lightweight base structure does not mean that the base system is small. Rather, the base system is devoid of all clutter that may obscure important parts of the system, or make access to them difficult or convoluted. It has a streamlined set of configuration files that are arranged for quick access and editing, with no cumbersome graphical configuration tools that tend to hide possibilities from the user. An Arch Linux system is therefore readily configurable to the very last detail.

On the other hand, Arch Linux keeps the inherent complexities of a GNU/Linux system intact, while exposing them to the user at the same time. Arch Linux developers and users believe that trying to hide the complexities of a system actually results in an even more complex system, and is therefore to be avoided.

Quote – The Arch Way

ArchLinux 真的很簡單,比 Fedoca Core,比 Gentoo,比 Ubuntu,比 CentOS 甚至比 Windows XP 都要來得簡單快速。KISS 是他們的哲學,第一次開機它真的只是要求自己能提供最簡單簡的-開機,下載,安裝,修改-這四個功能而已。你不需要去想移除或停用無謂的軟件或 service(不過我還是手動把 wireless 和手提電腦的支持移除了)。

也因為安裝程式不付有非必需的部份,所以我不用下載巨大的 ISO,系統更新時也不用替我用不到的元件更新,也不存在先從CD安裝舊版的 server,再馬上更新這種可笑而浪費時間的事。也不會有過時的 service 在運行而引起不必要的 security risk。

接下來下載安裝和設定 firewall, SSH, Linux kenel, Lighttpd, Mysql, PHP 都居然很簡單……..我想,比我在 Windows 上做同樣的事還要簡單方便。而且它的套件全部都已經為 i686 優化,我也不需要自己 recompile,也就是可以完全節省了 GCC 和一大堆 source code 的份量;相比為自己 recompile得到的優化,GCC 和一大堆 source code 實在是太重了。

, Hide

Aug/08

5

Protected: 夢

This post is password protected. To view it please enter your password below:


No tags Hide

<< Latest posts

Older posts >>

Theme Design by devolux.org