Posts Tagged Apache

Turn on the web server service on macOS

Apache webserver is shipped with all macOS version. The newer macOS version no longer provides user interface to control the webserver. Geeks who know Linux can turn on and off the webserver easily through the command line client. The following article on Apple community provides a step by step tutorial to do this.

Setting up a local web server on macOS 10.13 “High Sierra”

After you follow the above article to turn on your webserver. You can find the all software is up to date and ready to use. The latest PHP version is 7.1.7.


Tags: , , , , ,

Use GeoIP database to display distribution of different countries in your website traffic

Webalizer is a nice application that can analyze apache log files and generate summary graphs and tables to visualize web traffic data. I have used the application or different flavors of its updates for a long time. A while ago I wrote an article to summarize how to install AWFFULL on Ubuntu server. At that time, I did not pay much attention to study his configuration file and just utilized some default configuration functions.

Over the weekend, I installed the whole new version of Ubuntu server to one machine. I also install GeoIP module for Apache2 server. After that I downloaded the latest geoip database. In hope I can use the database to peek into my web traffic. I was thinking that ip to country information will show up in my AWFFULL output once the database is installed. I reran the webalizer application for the log files and checked the output information. Nothing was changed. No magic.

So I went ahead to check the AWFFULL configuration file. I search GeoIP in the file and found a couple of variables are related to geoip function. After I read the explanation about the two variables, I uncommented the switch variables and changed their values to reflect my real situation. Here are the AWFFULL variables:

GeoIP yes
GeoIPDatabase /usr/share/GeoIP/GeoIP.dat

After the changes are made and reran all log files. I got the desired output. The following are country graph and ip to country table.



Tags: , , , ,

PHP webmail clients – SquirrelMail vs RoundCube webmail

There are a lot of open source webmail clients available. Their quality and functionality varies greatly. A large number of blogs that introduce and compare them in detail are listed at the end of the article. To search and install a better webmail client for my Ubuntu + Apache server, I mainly tested two PHP open source webmail clients: SquirrelMail and RoundCube webmail. They do have drawbacks and advantages. The following provides a concise summary about what I learned from them.

1 User interface


SquirrelMail is a very basic webmail client. It was written in pure PHP with minimum JavaScript code. Its goal is to provide an email client that can be used in as many web browsers as possible. It does not have any fancy interface just plain basic functionality. However, it provide programming API that allows other people develop plugins to extend its functionality. Indeed there are a significant number of plugins available in it website. Figure 1 shows its user interface.

Figure 1

RoundCube webmail

Roundcube Webmail is a modern webmail client that implemented by PHP and AJAX technology. By using reading panel, it does not require to refresh the screen when you walk through your mails. Its functionality is more easy to use and organized than the Squirrelmail. Its internalization is much better and easy than Squirrelmail has. Figure 2 shows its user interface.

Figure 2

2 Installation

As a webmaster, installation is significant step and duty. Developers should provide easy way to install their application. Roundcube Webmail team does a great job to optimize the installation process. In contrast, SquirrelMail requires a lot of hassle to install it completely.

The stable version of SquirrelMail is 1.4.20 released on Mar 7, 2010. The downloaded package is 638KB in size (squirrelmail-1.4.20.tar.gz). The stable version of RoundCube is 0.3.1 released on Oct 31, 2009. The downloaded package is 1.8MB in size (roundcubemail-0.3.1.tar.gz).

After the packages are downloaded, you can extend them into folder by the following Linux command:

tar - xzf squirrelmail-1.4.20.tar.gz
tar - xzf roundcubemail-0.3.1.tar.gz

Follow the installation at to install RoundCube Webmail. This process involves database setup. I use MySQL server. I just followed the corresponding section to create new database and a user account for RoundCube Webmail.

After I run the install script in web browser, I have to do some manual work to make RoundCube Webmail work seamlessly with my mail server. Since my mail server use secure connection, I have to manually edit the configure file (config/ to change the mail host to “ssl://localhost”.

$rcmail_config['default_host'] = 'ssl://localhost';

Since sent, junk, and trash folders are located under “INBOX” in my mail server, I have to change the following folder locations manually.

$rcmail_config['drafts_mbox'] = 'INBOX.Drafts';
$rcmail_config['junk_mbox'] = 'INBOX.Junk';
$rcmail_config['sent_mbox'] = 'INBOX.Sent';
$rcmail_config['trash_mbox'] = 'INBOX.Trash';

Follow the installation manual at to install SquirrelMail.

The overall process to install RoundCube Webmail is easier and smoother than that of SquirrelMail installation.

Other thought

Address book

RoundCube provide basic address book and easy to use. New address can be added to the address book by clicking a button after the email address in the mail review panel.
In contrast, SquirrelMail does not provide essential address book function. You have to turn to a plugin to do it. I downloaded and installed “Add Address” at The functionality is ok but not as good as the one RoundCube provides.


RoundCube Webmail save user data into the database and make the upgrade process easier. SquirrelMail stores user data into data files. The integrity of data files is hard to maintain and make the upgrade process little hard.

Message filters

SquirrelMail provide a useful function called Message Filters. You can create filters that distribute mails to different folders. RoundCube Webmail does not provide anything like that.

Spam filters

SquirrelMail has a very useful function. SPAM filters, that allows you to select from various DNS based blacklists to detect junk email in your INBOX and move it to another folder (like Trash or Junk). I did not found detail information about spam filters in RoundCube Webmail. It might includes something but not configurable like SquirrelMail.


  1. Horde, SquirrelMail, and RoundCube
  2. 10 AJAX-based & PHP WebMail Clients For a Great User Experience

Tags: , , , , , , ,