How to Check the Ubuntu Version.

command line

How do you know which version of Ubuntu you are running? This will return something like this:

Read the full article →

Configuring Log Rotation of Apache2 and Other Logs

apache

I went to check out my apache2 logs and I noticed that they were being automatically rotated (access.log, access.log.1, etc.) and compressed with gzip (access.log.2.gz, etc.). This seems to be the default Ubuntu configuration. I wanted to make find out more, and I found this helpful article about Ubuntu logs, including Apache2 Log info and [...]

Read the full article →

How to rename a file or directory

command line

There is no rename function in Ubuntu Linux. Instead, you simply move the file, giving it a new name. If you don’t actually mv it to another directory, then you have effectively renamed it: If you are trying to rename a directory, you need to use the -r recursive flag:

Read the full article →

How to move or copy a directory

command line

I was trying to copy a directory, and I kept getting a cryptic error: cp: omitting directory `/var/log’ The copy (cp) command only works for files. To copy a directory, you need to use the -r recursive flag: In this case, I was trying to copy the log directory to make a quick and dirty [...]

Read the full article →

How to change your password from the command line

command line

To change your own password from the command line: To change the password for another user, you must use sudo:

Read the full article →

What is the Apache directive order of precedence?

apache

I am trying to implement some mod_rewrite RewriteRules using WordPressMU. I tried putting them in the Virtural Host file, but they did not appear to work. Since WPMU has a set of mod_rewrite RewriteRules in a .htaccess file, I wondered if the order of precedence was the problem. It seems that was indeed the cause. [...]

Read the full article →

How to debug Apache RewriteRule or mod_rewrite

apache

It’s hard to debug Apache RewriteRule (mod_rewrite) problems, especially when you have multiple rules. With applications like WPMU, it can be especially tough because WPMU may likely be doing it’s own RewriteRules. One trick is to turn on the rewrite log. To turn it on,try these lines in your .htaccess or virtual host file: For [...]

Read the full article →

WPMU is not generating robots.txt file

wpmu

I was setting up a new WPMU blog and checking my robots.txt file.  But all I got was a 404 Page Not Found.  It seems that WPMU was dynamically generating the robots.txt file. Why?  The answer was that I had no posts.  As soon as I added the first post, robots.txt was being generated just [...]

Read the full article →

7 Handy Firefox Shortcuts that I Use Most Often

firefox shortcuts, tweaks, and tips

Here are some handy  Firefox shortcuts that I use all the time: 1) crtl-k — puts the cursor in the google search box. 2) crtl-l (that’s an L) — puts the cursor in the URL box. 3) ctrl-tab –  switch tabs (forward) 4) ctrl-shift-tab  — switch tabs (backwards) 5) ctrl-t  — opens a new tab [...]

Read the full article →

How to install PHP GD2 library on Ubuntu

php

I needed to install the PHP GD2 library to support the WordPress captcha plugin SI CAPTCHA Anti-Spam.  I found the right library and installed it with this apt-get command: But SI CAPTCHA Anti-Spam test page still said GD Support: No.  The fix?  I had to restart apache: I tried the SI CAPTCHA Anti-Spam test again, [...]

Read the full article →