Stupid Admin Tricks

This is a general linux administration blog where I share some of the many tricks I've picked up along the way. Some of these will include some in-depth how-tos.

Here is a cool trick for users of multiple shell windows on Linux

Often, especially in Funtoo, ou frequently may have to add to a file with >>/etc/portage/package.mask (or .use or whatever). A slight typo could kill your file. Fix this way:

In your .profile

set -o noclobber

CGI Scripting with Tengine

What's the big deal? All Web servers support CGI scripts, right? NO! Nginx and Tengine don't. Why? Well, because it's a horribly inefficient protocol. For every request, the web server must fire up a large external interpretter, the interpretter loads a script, the script is parsed, compiled, executed, and finally output is sent back to the web-server. Other systems reduce this to just sending the URL over a UNIX-domain socket to an interpretter that is already running and has likely already parsed and compiled the scripts. This is a huge benefit.

OK, you've got your SSL certificate and you have tengine or nginx setup, but you need it secure. After all, you've heard of all the recent DH attacks, BEAST, CRIME, FREAK, Heartbleed and others, right? Is your system already secure? Test it! Check out The SSL Labs Test Site. I'm getting an A rating! The following assumes Tengine, but Nginx is exactly the same, just s/tengine/nginx/g