Nginx alias vs Roundcube

When you install Roundcube from a distribution package (for example a .deb package on Ubuntu) the package installs files under /usr/share/roundcube/ If you want to serve Roudncube from a different URI than /roundcube/, then you have two options (maybe more):

  1. Create a softlink with the desired name in the document root folder to the roundcube folder
  2. Use the alias directive of Nginx

The problem with the second option is that the default fastcgi.conf Nginx config will create the wrong SCRIPT_FILENAME value, thus PHP will not find the PHP file. The solutions is to overwrite this parameter value with the correct one:

location /mail/ {
  alias /usr/share/roundcube/;
  try_files $uri $uri/ /index.php?$args;
  location ~ .php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_param SCRIPT_FILENAME $request_filename;
    fastcgi_pass unix:/run/php/php-fpm.sock;
Posted in Uncategorized | Leave a comment

Migrating Windows XP from an HDD to an SSD

  I wanted to see how much better my old P4 machine fairs running on an SSD so I took one from work and set out on a journey with a few surprises, as it turned out. Continue reading

Posted in Upgrade, Windows | Tagged , , | Leave a comment

VMWare ESXi fun

I usually have “fun” it seems with technology and software. So remote management is a really convenient tool, but has its quirks as well.  Continue reading

Posted in VMWare | Leave a comment

InnoDB fun

I’m running a few servers, some of them have MySQL on it. Obviously some tables use InnoDB as the storage engine, which by default is not configured really well.  Continue reading

Posted in Config, MySQL | Leave a comment

Fun with Zend

There is a web server, Apache, which all of a sudden started to die in a funny way. It did not die completely, just did not serve pages…  Continue reading

Posted in Config, PHP | Leave a comment

Offtopic: Windows Media Audio vs Winamp

I like to listen to radio, but the PC is on anyway and there’s no hifi around I listen to it on the PC also. I would listen, because some radio stations are not Winamp-friendly and base their streaming on Windows Media Player (WMP), and don’t provide a link to a PLS file or something like this… Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Apache performance tuning

It happened that one hosted site had a sudden surge in visitor count and though the server was not brought to it’s knees completely page loading was very slow, basically the server was DOSed. It happened before that all of a sudden the load on the server spiked that could be solved with an Apache restart, but never knew why they happened. Maybe this was it… Continue reading

Posted in Config, Linux | Tagged , | Leave a comment

Apache weirdness

If you’ve ever seen this when starting Apache

apache2: Could not reliably determine the server's fully qualified
domain name, using <IP address> for ServerName

then check is you have an entry in your /etc/hosts file for this IP address and that the FQDN comes first, then the hostname. If hostname is first, move that to the back and restart/reload Apache. Instead of fiddling with the hosts file a mapping from IP to name in DNS might do, but I have not tested that.

Posted in Config, Linux | Tagged | Leave a comment

Postfix double vision

The task at hand was to set up a second instance of Postfix, the original will handle normal mail traffic for domains, both sending and receiving, while the other would only be used solely for sending and logs into a different file, so that it can be handled separately. Continue reading

Posted in Config, Linux, Ubuntu | Tagged | Leave a comment

Ubuntu upgrade hurdles

I’ve been testing an upgrade path from 9.04 (Jaunty) to 10.04 (Lucid) via 9.10 (Karmic) for a while now when I realized that Karmic may be deleted from the normal mirrors and only available on old-releases server. Started to get nervous how will I upgrade now. Read on to find out… Continue reading

Posted in Linux, Ubuntu, Upgrade | Tagged , | Leave a comment