| FreeBSD Server Administration | ![]() |
Today is the Chinese New Year's Eve, welcome to the Year of Rat!
I wish everyone a happy and fruitful new year!

Continue reading "Happy Chinese New Year"
Posted by FreeBSD Newbie at 07:32 AM | Comments (0)
Occasionally, some websites are unreachable due to weird network problems. Setting up a proxy server on our own server would be a very convenient solution, it's also safer than using a proxy which we know nothing about.
I tried Privoxy. It's very easy to use and worked well.
Installation
# cd /usr/ports/www/privoxy
# make install clean
# rehash
The configuration file is /usr/local/etc/privoxy/config, there is one line which must be changed:
listen-address 127.0.0.1:8118
The IP should be changed to your server's IP address. Also, it's better to use a non-default port number for security reasons.
Start Privoxy
# privoxy /usr/local/etc/privoxy/config
Now you can configure your browser or other Internet software with the listen-address configured above.
Posted by FreeBSD Newbie at 03:48 PM | Comments (3)
If you visit this Blog with FireFox, you can see an orange box in the right bottom corner, that means this site support RSS feed, you can subscribe a live bookmark by clicking on it. This is a built-in feature of Movabletype.
I don't know since when RSS feed was popular, I just see it everywhere. I didn't pay any attention to it until Google released Google Sitemaps (Beta). It's a new way of Google to crawl websites, Google will index web pages according to the sitemap files submitted by webmasters. Google defined their own format for sitemap file - a XML file, basically a URL list, which is very similar to RSS feed but doesn't comply with any RSS standards. I wrote a PHP script for generating the sitemap file, and submit to Google daily with a cron job. Though I didn't find the pages get indexed faster, maybe because it's still in beta.
For the same purpose I checked out My Yahoo, actually it's for My Yahoo users, but it can make Yahoo include a new website faster. It's easy to write a PHP script to generate the RSS feed, then notify My Yahoo with a cron job on a regular basis. Yahoo has an excellent RSS guide, plus RSS 2.0 Specification, these should be enough for most tasks.
My thought after played with Google Sitemaps and My Yahoo:
RSS feeds are not only for Blogs. General websites, especially those database-driven and updated frequently, should support RSS feeds too, make Google Sitemaps and My Yahoo submission automate. It's not only convenient to the visitors, but also preferred by the mighty Search Engines.
Posted by FreeBSD Newbie at 03:37 PM | Comments (0)
This is about MT-Blacklist, an anti-spam add-on for MovableType, which works great by scanning incoming comments, deny or force moderation if the comment contains specified words or exceeds URL limit. The comment system is hardly usable without MT-Blacklist, it takes much time to delete hundreds of automated spam comments each day.
After changed hosting, the perl version is different on the new server, MT-Blacklist can't read the database data due to the different byte order, error message looks like:
Plugin error: plugins/Blacklist.pl Byte order is not compatible at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 363, at lib/MT/PluginData.pm line 28 Compilation failed in require at lib/MT.pm line 291.
The problem was fixed after I deleted all records in the table mt_plugindata.
Posted by FreeBSD Newbie at 01:38 AM | Comments (0)