Simple Changes to Secure Apache

Simple Changes to Secure Apache

Coding, Guide
Keep Updated You should update your linux settings no less than once a month. This will ensure that you are not running vulnerable technology. Remove Header Details / Disable Tokens When Apache web server generates any web pages or error pages, some important information about the version and other details implemented on the system are displayed in the web site server header. ex: Server: Apache/2.0.53 (Ubuntu) PHP/4.3.10-10ubuntu4 Server at xx.xx.xx.xx Port 80 To ensure that the Apache HTTP web server does not broadcast this message to the whole world publicly and fix possible security issue, modify these two directives ServerTokens and ServerSignature in httpd.conf configuration file. Edit the /etc/apache2/httpd.conf Add the following: ServerSignature Off ServerTokens Prod Save and restart the apache web service. You server will then only identify itself as Server: apache…
Read More
Useful Command Line Scripts

Useful Command Line Scripts

Coding
Below is a list of very common linux commands that any linux person should know by heart. From gzipping files, to running backups this is my personal cheat sheet Compressing Files and Folders Unzip 7z Archive 7za x myfiles.7z gzip File gzip -9 file gzip Folder tar -zcvf archive-name.tar.gz directory-name Uncompress Gzip File gzip -d file.gz Remove Files and Folders Removing a large number of files If you're getting this error: /bin/rm: Argument list too long. Use this command: find . -type f -delete Remove folder from SVN rm -rf `find . -type d -name .svn` Remove ._ files find . -name "._*" -exec rm '{}' \; -print Remove Dreamweaver Notes rm -rf `find . -type d -name _notes` Renaming Multiple Files find . -name "*.jpg" -exec sh -c 'mv…
Read More
Basic Linux Commands For Managing A LAMPP Server

Basic Linux Commands For Managing A LAMPP Server

Coding, Guide
Frequently I am asked by clients for details on how to manage a lampp server. While I do not recommend that clients who are not familiar with systems mess with the core system there are a few simple tasks that anyone can do to back or restart basic systems. Let's get started. First you need an account with SUDO access to the server. By SUDO you are going to SSH into the server. SSH? SUDO? Linux servers typically do not have a windows type interface to them and require that you to everything in a command line system. SSH is how we are going to connect to the server. To do this you need a terminal program, OSX on the Mac includes one out of the box. Windows users will…
Read More
Installing GeoIP for Apache2

Installing GeoIP for Apache2

Coding, Guide
From time to time I need to install a way to accurately determine where users are located based on their header information. Thankfully there is a wonderful free database from MaxMind that gives you this ability when you install it with Apache2. Here are the steps to get it all setup on your Ubuntu (or other Linux) server. Let's get started! There are two different databases. One for country and one for local. From the terminal: cd /tmp/ wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz gunzip ** Now we've got a folder /tmp/ with two dat files - GeoIP.dat and GeoLiteCity.dat. Copy those over to this shared folder: mkdir /usr/local/share/GeoIP/ cp ** /usr/local/share/GeoIP/ Next we need to install the Apache2 Module for using these databases. sudo apt-get install libapache2-mod-geoip And then we need to configure apache2 to…
Read More
What I Use 2011

What I Use 2011

Opinions
Here is the updated list of the computers, gadgets and software I use on a regular basis. Computer(s) MacBook Pro What a difference a few years make! While I used to be a hardcore Windows user, now I can't stand it. I happily use my MacBook Pro and loath using Windows at all. I am running OSX 10.7 Lion and really love it. I don't miss anything about my Windows system at all. I actually feel sorry for people forced to use Microsoft software. iPhone 3GS With iOS5 and all the bells and whistles my 3GS is an amazing computer. The phone continues to be sad, the system as a whole rocks. Planning on getting the 4S when my upgrade is available. The iPhone is hands down the best PDA/iPod/Camera/Tool…
Read More
Install Apache and PHP to do Secure h264 Pseudo Streaming

Install Apache and PHP to do Secure h264 Pseudo Streaming

Guide
If you've ever wanted to stream MP4s securely over the internet while preventing hotlinking and stealing of your content, hopefully this helps. 1. Install Ubuntu Download and install Ubuntu from here 2. Install LAMPP settings Quick and dirty, just install MySQL Server: sudo apt-get install mysql-server Then install PHPMyAdmin - make sure to choose Apache2 when it asks for the server sudo apt-get install phpmyadmin 3. Install H264 Module By now you should be able to go to your server (http://localhost/phpmyadmin) and login with PHP. This is the very very first key part to get this all working. We need to install the APache eXtenSion tool, to build and install the module for the Apache server. sudo apt-get install apache2-threaded-dev Then download the latest H264 Streaming Module for Apache and…
Read More
Installing Nginx with PHP5 on Ubuntu 10

Installing Nginx with PHP5 on Ubuntu 10

Guide
There are a number of guide across the internet that break down how to install this setup. I had to use a couple different ones just to get it to work. Here's how I did it. Note: you should run this from the terminal - and as root (sudo -s) Step 1 - Install Ubuntu I installed it on a VM but it really doesn't matter. For the sake of this guide I downloaded Ubuntu 10.04.1 LTS version. Step 2 Install PHP FastCGI From the terminal sudo apt-get install php5-cgi Step 3 Install Nginx - latest stable The build in repo for Ubuntu is running version 7 - as of right now the latest stable is 8.54 so we need to update the repo and get the latest version. add-apt-repository ppa:nginx/stable…
Read More
Get system specs in Linux

Get system specs in Linux

Guide
I've been looked for a CPUZ type program for my Linux (Ubuntu) so I could see the bios info and what motherboard specs I have in my computer. This little scrips works great. First launch terminal Applications > Accessories > Terminal then type: sudo lshw -html > Myhardware.html The terminal will ask for your password, enter it and then it will generate a HTML file in your home folder called Myhardware.html. Launch your home folder and double click on Myhardware.html to get all of your specs.
Read More
Installing a Virtual LAMPP Server with VirtualBox and Ubuntu

Installing a Virtual LAMPP Server with VirtualBox and Ubuntu

Guide
Part 1 Install Virtual Box Download it free from virtualbox.org and run through the installer. Part 2 Download the latest Ubuntu software. I like the desktop version as I can do other things besides just run a server. Download the ISO here: http://www.ubuntu.com/getubuntu/download Part 3 Install Ubuntu on VirtualBox Launch VirtualBox and create an new virtual machine. When creating the machine, Virtual box will ask what type. Name your machine: Ubuntu Server Operating System: Linux Version: Ubuntu All the other settings are fine as they are setup by default. Once you are back at the Virtual Box select a machine screen, double click on your new Ubuntu Server. The first run Wizard appears. Follow the questions and when prompted to select the installation media, browse to the newly downloaded ISO you downloaded…
Read More
Ubuntu 9.10 Review

Ubuntu 9.10 Review

Review
It’s been a couple of months since the release of the latest and greatest of Ubuntu, Karmic Koala and while we’ve been busy building servers based on the this release we can say with out a doubt it just keeps getting better. The refinements in the Gnome interface really are paying off in spades, as this release is more than ready for prime time. Finally the new file system is enabled by default. By this we mean ext4. While not many people care about this, it adds more speed to the already great linux distro. Overall systems feel snappier and I really chalk it up to this new file system. That and all of the work being done on the boot up and launcher times are really starting to add…
Read More