thinking out loud…

…ramblings of Peter Amiri

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

admin February 25, 2013 Leave A Comment Permalink

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

cd /var/cpanel/users
for user in *
chown -R $user.$user /home/$user/public_html/*

This script fix all ownership issue

admin February 12, 2013 Leave A Comment Permalink

admin February 3, 2013 Leave A Comment Permalink

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:


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:


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.

admin February 3, 2013 Leave A Comment Permalink

admin February 3, 2013 Leave A Comment Permalink

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:

service httpd restart
service cpanel restart

admin December 11, 2012 Leave A Comment Permalink

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


admin September 20, 2011 Leave A Comment Permalink

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

admin August 18, 2011 Leave A Comment Permalink

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


/etc/init.d/httpd restart

Restoring a failed cPanel Apache build

If the Apache rebuilt is successful but httpd cannot be started due to configuration issues the following scripts can help to restore a previous or archived build.

# /scripts/easyapache --restore-archive
Bring up UI to choose available archives and restore them if desired

# /scripts/easyapache --restore-archive=listonly
List available archives only

# /scripts/easyapache --restore-archive=/path/to/easyapache/archive
Attempt to restore this build archive
!! only use if you are 100% sure the path is an easyapache build archive !!

admin January 10, 2011 Leave A Comment Permalink