Top Nav

Apache2 With mod_fcgid On CentOS 6.2

Need mod_fcgid on a CentOS 6.2 or similar server? Check out this great how-to:

I especially like the use of suexec.

This howto worked on the first try! There are not many actual working mod_fcgid howtos!

One issue that I did run into is the default MaxRequestLen is 131768 which is way to low so had to add this line:

to /etc/httpd/conf.d/fcgid.conf.



Redirect Generator

Happened onto this “301 Redirect Generator” page today:

What’s notable is that it can generate PHP, ASP, ASP.Net, .htaccess, HTML meta tag and Javascript redirects. I used it to generate some redirects on a Windows server in ASP.Net.

Noted too is the lack of support for Web.config HTTP Redirects and Nginx.

Anybody know of a better tool for generating redirects?


Using SSHFS To Mount Remote Filesystem

If you need to do a lot of file operations against a remote ssh/sftp server then sshfs might be the perfect tool. sshfs is a FUSE filesystem that you can mount onto a local mount point. Once mounted you can manipulate the files as if there were local.

Here’s the project site:

You might need to install with yum or apt-get:

After sshfs installed you can use it like this:

You’ll be prompted for a password unless you has keys setup with the remote server.

Now you can copy files to and from under mymount/.


Multiple Domains One WordPress

Let’s say you want to have more then one domain pointing to a WordPress site. Each domain should show the same content but you don’t want to redirect to the primary domain. This is a problem with WordPress because it tries to redirect to a single canonical domain. The solution is the “Any Hostname” plugin:

After installing the plugin, go to:

WordPress Admin -> Settings -> General

At the bottom of the screen you’ll find an “Any Hostname” section where you can add additional domain names to the site. So now you can have “” as the primary domain and one or more additional names like “”. The website will be displayed on each domain as if it were the primary with no redirect.


Plesk & New Relic

New Relic is a great tool for managing website performance. Recently worked to setup a Plesk 12 server with New Relic. We wanted to have each virtual host on the website represented by an Application in New Relic as documented here:

We found a few useful points that we want to share:

1. The newrelic.appname must be removed from /etc/php.d/newrelic.ini.  If the appname is defined in this file then individual virtual hosts will not be able to override and provide there own appname. Just edit the file and comment out the line like:

2. Set the appname for each virtual host from Plesk by going to:

and adding a line like this:

to the “Additional configuration directives” field. Notice that the appname has two components separated by a semicolon. The first is the domain for the site and the second is the fully qualified server hostname. So for example you might do:

and then another site on the server might be:

Now in New Relic, you’ll see three applications. One for, one for and one for the entire server called