apache

How to Password Protect WordPress Admin (or Any) Apache Directory

apache

If you are running WordPress, it’s a good idea to lock down the WordPress admin. Sure, it’s password protected already. But you can (and should) add some extra security to lessen your vulnerability to any newly discovered PHP or WordPress security bugs. Background We recently enhanced our own WordPress security and added an extra layer [...]

Read the full article →

301 Redirect from Bare Domain to Full WWW Domain

apache

We recently set up Google Pagespeed Service for one of our WordPress sites. The site was setup with a “bare” domain name. That is, it had no subdomain. For example: http://healthfitnessexperts.com Google’s Pagespeed Service can’t handle bare domains. Like many content delivery networks (CDNs) and similar services, Pagespeed requires a subdomain like www. For example: [...]

Read the full article →

Restarting Apache Gracefully

apache

If you are restarting the web server on a live website, you should do it gracefully. A graceful restart tells the web sever to finish any active connections before restarting. This means that active visitors to your site will be able to finish downloading anything already in progress before the server restarts. If you are [...]

Read the full article →

How to Upgrade APC on Ubunutu

apache

APC — the Alternative PHP Cache — is a handy caching utility for use with PHP. We use it with W3 Total Cache to speed up our WordPress sites. I recently had a little trouble remembering how to upgrade APC to a more current version on our Ubuntu installations. We had installed APC with pecl, [...]

Read the full article →

PHP APC: How to Monitor Usage and Config for Optimum Performance

apache

APC is the Alternative PHP Cache. It’s a handy caching utility for use with PHP. We use it with W3 Total Cache on our WordPress installations. It runs OK “out of the box.” But you likely need to tune the config a bit to get the most out of it. The most common tweak is [...]

Read the full article →

Setup WordPress or WPMU to make an atomic version switch — AND allow you to revert

apache

I have a new WordPress MU (WPMU) install and I am ready for my first upgrade. I couldn’t get automatic upgrade to work, and all the forums said: do it by hand manually. This is fine, but I didn’t want my site to be in flux with some old an some new files as I [...]

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 →

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: If [...]

Read the full article →