Author Archives: Peter

Lucy, I’m Home!!!

Well I’ve been away for a while. Ah, okay maybe it was longer than a while. It’s been a little over 9 years since my last post. Life has a way of taking over and before you know it, everything is different. When I last posted here, I was knee deep in the hosting business. Alurium provided shared CFML hosting and VPS hosting services. We had just moved from Southern California to the suburbs of Atlanta to be closer to my wife’s parents. Then dad’s health deteriorated and he eventually past in December of 2014. During this time I had systematically reduced the hosting business and transitions my clients to Vivio Technologies.

Then in March of 2015 life took a turn once again and I agreed to join the family owned business my father in law had help start as PAI Industries’ CTO. There was much cleanup work to be done and eventually the infrastructure was upgraded, data center cage setup, virtualization environment setup, and multiple locations were connected via redundant wide area network links.

Then in April of 2018 we turned our attention to our software stack and rebuilt our e-commerce site from the ground up using CFML, Lucee, and CFWheels. With the backend data residing in MS SQL Server, MySQL, Rocket UniVerse, and ElasticSearch. In the short few year from our launch in January of 2019, the site has become to be known as one of if not the top site in our industry.

Life wasn’t finished throwing curve balls. In May of 2019 we officially moved back to Southern California. I still work for PAI and in fact work East Coast hours with my days starting at 4:00AM but finishing at 2:00PM. We adopted Zoom, even before the rush to online meetings which was ushered in by the Corona Virus Pandemic, and I spend a majority of my day in a Zoom Room so I am physically in California but virtually in our IT room in Georgia.

This almost brings us up to date with the fog of the pandemic and lock downs of the last couple of years not whit standing. During this time, I’ve had time to reflect on my personal goals and I plan to pursue a few of them more vigorously. One of these goals is to write a technical book. Yes, people still do that. I plan on writing a programing book on CFWheels based on an awesome book call the “The Ruby on Rails Tutorial” by Michael Hartl. Michael has graciously given his blessings on this project.

So what can you expect in this space going forward, as I’ve been looking at the beginning chapters of the book and formulating my outline and content, I’ve noticed some deficiencies in the CFWheels tooling so I’ve been busing contributing to the CFWHeels CLI project as well as the CFWheels project. Additionally I’ve been working on the package management for CFWheels and posting packages to Forgebox. All in all my intention is to make it very easy for someone to take CFWheels for a spin without much friction.

You can expect to see posts on specific topics as I learn through this process and tackle different technologies.

Internal Error Server 500

On a cPanel server running suPHP getting Internal Server Errors can be caused by file or directory permissions. One of the best ways to diagnose such issues it to look at the suPHP log files and fix any errors that are reported.

tail -f /usr/local/apache/logs/suphp_log

Fixing cPanel file permissions

Just for my own note
After installing suPHP on server, execute :

find /home/*/public_html -type d -exec chmod 755 {} ;

This command fix all folder permission

find /home/*/public_html -name '*.php' -o -name '*.php[345]' -o -name '*.phtml'| xargs chmod -v 644

This command fix all file permission

#!/bin/bash
cd /var/cpanel/users
for user in *
do
chown -R $user.$user /home/$user/public_html/*
done

This script fix all ownership issue

Removing siteid and index.cfm from Mura URLs

In this article we will be going through the way to change your Mura CMS URLS from:

http://www.yourdomain.com/default/index.cfm/page/sub-page/

INTO

http://www.yourdomain.com/page/sub-page/

To remove the siteID directory in the URL:
In the local contentRenderer.cfc ([www/[siteID]/includes/contentRenderer.cfc) uncomment the function named getURLStem() or paste the below code at the base of the file:



    
    
    
        
     
        
    

Edit www/index.cfm and replace:

with

The .htaccess file / code to remove the index.cfm:

RewriteEngine On

# If it's a real path, just serve it
RewriteCond  %{REQUEST_FILENAME}  -f  [OR]
RewriteCond  %{REQUEST_FILENAME}  -d
RewriteRule  .  -  [L]

# Redirect if no trailing slash
RewriteRule  ^(.+[^/])$  $1/  [R=301,L]

# Rewrite Mura CMS URL paths
RewriteRule  ^(.*)$  /index.cfm%{REQUEST_URI}  [L]

The old /[siteID]/ urls will still work after making these changes.

cPanel missing dedicated IP

Every now and then I get a site on our cPanel servers that stops working. After investigating the issue it turns out to be a missing IP from the cPanel server. Here is the latest remedy I found for this:

/scripts/rebuildhttpdconf
service httpd restart
service cpanel restart

SNMP on XenServer

To start SNMP on XenServer 4.0.1, 4.1, or 5, use the following command

service snmpd start

This command only starts the SNMP daemon. To have the service start during system start up, please use the “chkconfig” utility.

chkconfig snmpd on

 

FTP Server in Mac OS X Lion

At first glance it looks like Apple has removed the FTP server support in Lion. But if you dig a little deeper you’ll find that the only thing that has really been removed is the GUI related to the FTP server.

Here’s how you can start the FTP server in Mac OS X Lion:

  1. Open a terminal window.
  2. Type in the following command:
  3. sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist

  4. To turn it off, type in the following command:
  5. sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist

Clean HTTP Usage in cPanel IP Usage table

Once again this is a place holder for myself as to the steps needed to change a phantom entry in the IP Usage Table in cPanel. We run our cPanel servers on VM within our environment. So we have a cPanel template that is used to spin off new servers as needed. The IP and host name of the newly spun off servers has to be changed and sometimes the old entries get stuck in this table.

cd /var/cpanel/userdata/nobody
“ls” showed the following files:

main main.cache

nano main

/scripts/rebuildhttpdconf

/etc/init.d/httpd restart