Archive for the ‘Apache Administration’ Category

Missing Accounts From WHM

Monday, February 22nd, 2010

If you list accounts and one of your accounts is missing, run this command in the shell:

/scripts/rebuildcpusers

Disable Mod_Security In .htaccess

Friday, November 20th, 2009

This post adresses the issue of disabling mod_security on a per account basis. Just add this code to a .htaccess file:

SecFilterEngine Off
SecFilterScanPOST Off

Correct Permission Problem In Suphp

Tuesday, November 3rd, 2009

With Suphp, you can’t have any files or folders with permissions greater than 755. Otherwise, you will get a Internal Server Error. There could be other reasons for that error. You must check the apache error_log. In Centos, you will find that file in /usr/local/apache/logs/error_log.

Confirmed the permission problem, a easy fix is to ssh to the server. Access the public_html folder of the account. And run these commands:

find . -type f -exec chmod 644 '{}' \;
find . -type d -exec chmod 755 '{}' \;

If you don’t have ssh access to your shared hosting account, upload a php file to the public_html directory and call the file in the browser. Include this code in the php file:

<?
shell_exec("find . -type d -exec chmod 755 {} \\;");
shell_exec("find . -type f -name '*.php' -exec chmod 644 {} \\;");
?>