SSH Keys

Another way to help secure your server, or useful tool when setting up your own git repository are to use public/private ssh keys.

Using encrypted keys for authentication offers two main benefits. Firstly, it is convenient as you no longer need to enter a password (unless you encrypt your keys with password protection) if you use public/private keys. Secondly, once public/private key pair authentication has been set up on the server, you can disable password authentication completely meaning that without an authorized key you can’t gain access – so no more password cracking attempts.
CentOS wiki

Continue Reading…

Logwatch is a program that analyses your log files and e-mails you the output.
This assumes you already have your server configured to send email.
(This article is a cut down version of the article found at ubuntugeek.com)

Edit the config

Set

Edit the cron job file

and add

 

Securing your Ubuntu Server

When you first buy a VPS or a dedicated server for that matter, chances are it has been set up with only minimal security in place, after all it is your job to set it up how you want it.
This post will show you how to make your Ubuntu web server more secure, although most of it applies to other distributions by changing apt-get to yum. Lets get started…

Continue Reading…

PHP APC

A quick way to speed up your PHP website is to install Alternative PHP Cache (APC)
Ubuntu users can install it by typing

Then edit your php.ini and add

and restart apache.
If you time the execution of your pages before and after the difference should be quite significant.
Non Ubuntu users can install APC via PECL.

A number of times I have found myself having to google to find the command to find the size of directories on my linux based webserver, so I figured I would put it here on my blog for easy reference.
To display the size of each sub-directory of the specified folder with the total at the bottom, making it very easy to see where your storage space is going use:

For a simple total of the size of your current directory type:

Update:
Keith Fernie suggested I use this

It gives the total sizes of each sub-directory within the current folder, sorted by descending size.
Easier to use if you create an alias.