My memory is horrible and this weblog acts as the remedy, if you find some of the articles messy and incomplete it's because it was written for myself. However, if you find any use of it then feel free to do so. Just beware that you are using it on your own risk!

Better-, Butter-, B-tree Filesystem (btrfs)

My standard Linux server setup usually consists of a software raid1 with two disks syncing. The problem with traditional raid, both software and hardware raid, is that it is only useful if one of your drives completely dies. If you experience Silent Data Corruption or if your drive goes bad you might end up with the raid syncing junk across your disks.

Continue reading “Better-, Butter-, B-tree Filesystem (btrfs)”

LXC 2.x Web GUI

LXC is an abbreviation for “Linux Containers which is a feature in the linux kernel, it allows you to install multiple Linux installations running on the same kernel. It’s kind of like chroot but much more powerful as it allows for process and network isolation.

I’ve seen that there is a fancy web GUI for Ubuntu and i felt the need for something similar in Debian (never actually tried the Ubuntu LXC Web Panel)

Continue reading “LXC 2.x Web GUI”

Snapshot databases & files

Imagine that the filesystem is book and each entry in the table of contents (TOC) is a reference to a chapter. In the filesystem this “chapter” is referred to as an inode and the TOC entry is called a hard link.
you may call it a file ;)

Now the cool thing about this is that we can have several links to the same inode, in fact we can have 65.000 hard links to the same inode without using up any extra space.

Continue reading “Snapshot databases & files”

Custom Post Type with Taxonomy

Posts and pages are two sides of the same coin, the main difference is that posts (a.k.a blog-posts) are sorted by date and have optional categories or tags, pages do not.

Under the hood they are both called post_types but they have been initialized with different parameters.

We will be creating our own post type with it’s own taxonomy (categories) for storing favourite music videos.

Continue reading “Custom Post Type with Taxonomy”

Securing WordPress with .htaccess

Leaving your wp-login.php script or wp-admin folder accessible from the internet allows for bruteforcing of your passwords

My way of solving this is by creating a randomly named folder e.g. “asbra” with som php code that sets a cookie which is required by the .htaccess file. Continue reading “Securing WordPress with .htaccess”

Leverage browser caching

If you’ve ever tried the Google Developers Audit or the Pingdom Speed test on your website then you’ve probably seen the warning about “Leverage browser caching“, it basicly means that the site tells the browser to keep some of the files cached for faster page loading.

You can do this with your local .htaccess file:

Continue reading “Leverage browser caching”

TLS v1.1 is being phased out by 30 June 2018

Apache supports lots of different encryption protocols, some of which have serious vulnerabilities that puts sites at risk of being breached.

The Poodle and Beast exploits are just a couple examples of how attackers have taken advantage of weaknesses in SSL and TLS to compromise organizations. Continue reading “TLS v1.1 is being phased out by 30 June 2018”