Monthly Archives: February 2013

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.