ServerSignature and ServerTokens

ServerSignature and ServerTokens are two variables that determine how the Apache server describes itself, which makes it useful to keep some secrets.   While obscurity is not security, it’s nevertheless a good idea not to save a potential attacker time by giving them the exact versions of everything you run on your server.

ServerTokens

ServerTokens describe how much information about itself Apache divulges, both in the HTTP headers, and in the signature on server-generated pages, such as errors and directory indexes.  Here are the possible settings and example values:

Full:  Apache/2.2.3 (Red Hat) mod_ssl/2.2.4 OpenSSL/0.9.7l DAV/2 mod_fastcgi/2.4.2 PHP/5.1.5 mod_jk/1.2.15
OS: Apache/2.2.3 (Red Hat)
Minimal: Apache/2.2.3
Minor: Apache/2.2
Major: Apache/2
ProductOnly:  Apache

ServerSignature

This describes how Apache refers to it
self in server-generated pages.  Possible values are On, Off or EMail.  On will give a message like:

Apache Server at www.example.com Port 80

Where “Apache Server” is the result of the ServerTokens value.  Setting ServerSignature to EMail, will give something like (note the mailto link):

Apache Server at www.somerandomstuff.com Port 80

And finally, setting it to Off, will show nothing.

Konsole and the console font

After doing some updates on my Debian Lenny workstation, I noticed that KDE’s Konsole is no longer able to find the “Console” font, and upon trying to install it, I’m greeted with an error saying:

Could not install console8x16.pcf.gz into fonts:/Personal/

Fortunately, this is easily fixable. As root, run the following:

# dpkg-reconfigure fontconfig-config

Choose the default option to all but the question about bitmap fonts – choose YES here. This will enable support for bitmap fonts. Then do:

# dpkg-reconfigure fontconfig

This will update the font cache. Now restart your Konsole, and your fonts should be back to normal.

Update 2009/03/07:   I had this happen to me again today (did a dist-upgrade to Squeeze) and after running the above fix, only one of the two missing fonts returned.   I found that removing the contents of ~/.fontconfig/ does the trick.

Update 2009/07/25:   I got a new PC at work, and this time did a clean install of Squeeze, which meant getting dumped into KDE4.  Again, the font was missing, and the font installer wouldn’t see the pcf file.  I had to do the above, and then, using the font installer, had to type *.pcf  in the filter field – this installed the font.  I also had to set font anti-aliasing to “enabled” instead of “system settings” in the System Settings panel –> Appearance –> Fonts.

Plesk: Finding large log files

I get this kind of problem every day: “We’ve run out of disc space on our Plesk server – what’s taking up all the space?” The answer, almost every time, is “logs.” Plesk doesn’t enable log rotation by default, so logs can end up taking a lot of space.

Here’s something I cooked up to list the size of each domain’s log directory:

Continue reading “Plesk: Finding large log files”

SMTP status codes

Have you ever wondered what all those SMTP status codes mean? It’s not that hard to read. Each code consists of three numbers. The format for this is class.subject.detail, for example 2.5.0 (also written as 250).

Here is a list of the classes:

2.x.x - Succes
4.x.x - Temporary failure
5.x.x - Permanent failure

Here are the subjects:

x.0.x - Other or undefined
x.1.x - Addressing related
x.2.x - Mailbox related
x.3.x - Mail system related
x.4.x - Network or routing related
x.5.x - Mail delivery protocol related
x.6.x - Message content related
x.7.x - Security or policy related

Continue reading “SMTP status codes”