Linux System Administration 32
Block Countries With Nginx and GeoIP
You can use nginx to either allow or deny certain countries from accessing your site using the GeoIP database which maps IP addresses to the origin country. Nginx GeoIP Requirements Nginx Installation – Nginx must already be installed on your server if it is not yet. Please see How to Install Nginx Nginx must also be […]
Nginx Directory Protection
There are a few different ways to protect directories with Nginx. Password protection is typically to keep certain users out or only let certain users in. This is useful in protecting certain content on websites you do not want everyone to be able to access. This guide assumes you already have a running Nginx installation, […]
Blocking Bad UserAgents with ModSecurity and Fail2ban
Many bots crawl websites that do nothing to generate positive traffic for the site. They just use up available resources and bandwidth of the server. You can reduce this drastically by implementing blocking using ModSecurity to detect the bad agents and then fail2ban to block them in iptables for a period of time. This guide […]
mod_fastcgi Installation on Apache 2.2
What is mod_fastcgi? mod_fastcgi is an Apache module for interfacing with CGI programs allowing a server to handle more requests at one time. It does this by keeping an instance of php running in the background. When apache receives the request it forwards it to FasctCGI. It can increase performance and reduce memory useage over […]
How To Use LVM To Create A New Logical Volume
What is LVM Logical Volume Managment (LVM) is an abstraction layer between physical devices and the file systems which they create. This can make disk management easier by adding abilities to shrink or expand filesystems by just adding additional physical devices no longer being limited to a single physical device as the volume can span […]
KVM Virsh Console Access on CentOS 7
By default Kernel-Based Virtual Machines(KVM) are not set up to access a serial console on the host using virsh. To enable a serial virsh console, so you can view text-based output on the host machine from the virtual machine you will need to make modifications to both the virtual machine and the physical machine. Enabling […]
Using Parted To Create A New Swap Disk
What is Parted? Parted is a software package used to manipulate paritition tables. It is useful for formatting new disks, reorganinzing disks, and removing disk data First select the disk you would like to use, if you are unsure you you can use fdisk to list all of the disks available to you fdisk -l […]
Most Commented