Working Ninja
2017-07-12T19:50:17

Using IUS (Inline with Upstream Stable)--a nifty repository provided by EPEL--we can upgrade beyond PHP 5.4 by first removing our current version of PHP, installing our preferred version (5.6 in our case), and then restarting Apache:

$ sudo yum remove php-cli mod_php php-common

$ sudo yum …

READ MORE

2015-11-20T09:29:39

When setting up the SSL certificate for workingninja.com, I made a mistake in my VirtualHosts configuration file that handled the redirect of the non-SSL site to the SSL site. The mistakes was simple:  I forgot a trailing slash on the receiving end of the redirect. Without the trailing slash on …

READ MORE

2015-01-02T18:01:19

Here’s the process I followed to get ImageMagick installed on a CentOS 5 DV Server over at Media Temple. I needed ImageMagick to convert PDFs to JPG files.

  1. yum install ImageMagick*
  2. pecl install imagick

    Here’s where I encountered the first hiccup:

    shtool at ‘/var/tmp/imagick/build/shtool’ does not exist or is not …

READ MORE

2014-11-11T17:56:26

Get to vhost root:
alias www='cd /var/www/vhosts/'

From domain.name, get to WordPress theme directory:
alias t='cd httpdocs/wp-content/themes/'

Restart Apache gracefully:
alias apachegrace='/etc/init.d/httpd restart graceful'

Directory listing with timestamp, ownership, permissions, etc:
alias ls="ls -l"

READ MORE

2014-10-16T17:51:07

Add the following to your .htaccess file to block posts to wp-comment-posts.php and wp-login.php that have do not have an http referrer or user agent. This will also redirect the user back to their IP address.

<IfModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteCond %{REQUEST_METHOD} POST 
    RewriteCond %{REQUEST_URI} .(wp-comments-post|wp-login)\.php* 
    RewriteCond %{HTTP_REFERER} !.*domain.name.* [OR] …

READ MORE

2014-04-05T17:40:11

Here’s the lowdown on how I setup my MAMP (Mac, Apache, MySQL and PHP) server for local web development and the steps I went through to create a development environment for a site already in production.

Configuring Apache

Apache comes preinstalled with OS X so I decided to stick with …

READ MORE