Home » Hosting Controller

Script used to correct permission of files after suphp

Script used to correct permission of files after suphp #!/bin/bash # For some stupid reason, cPanel screws up the directory permissions. chmod 755 /opt/suphp find /opt/suphp -type d -exec chmod 755 {} \; # Ensure that the permissions are sane and won’t cause a 500 error. for user in `/bin/ls /var/cpanel/users`; do chown -R ${user}:${user} [...]

Allow php scripts to work under ~username when using suPhp (custombuild)

By default, suPhp is compiled in “paranoid” mode.  This means that the settings in the user httpd.conf files: suPHP_UserGroup username username will require all php files to be owned by username or suPhp will throw a “500 Internal Server Error”. This does not apply to domains, when used normally, because each domain has it’s own [...]

Account list missing from WHM

Issue: Hosting account do not show up in WHM Cause: /etc/trueuserdomains file which holds a list of account on the server is empty Solution: restore contents of /etc/trueuserdomains and update cpanel with /scripts/upcp Incoming search terms:/etc/trueuserdomains empty (1)trueuserdomains empty (1)

HowTo Install APC on CPanel/WHM

CPanel includes support in their installer for eaccelerator; still, for some strange reason they don’t include support for APC also. So, if you want to install APC on your CPanel powered server, you will have to go back at the command line and install it manually. Here are the steps needed to install the latest [...]

Install ImageMagick and Imagick on Cpanel Server

Here’s a quick how-to for installing ImageMagick and Imagick on Cpanel server. I will cover only the procedure using the Cpanel built-in scripts, although you can also install it the usual way (rpm or source install). ImageMagick is the application for working with images while the Imagick is a PHP extention to modify/create images using [...]

Change Hostname of Cpanel Server

This task is very simple and can be done in two steps: 1.)  Login as root and change your server hostname: hostname newhos.name.tld Note: Don’t forget to create an A entry for your new hostname, otherwise you will get a popup message during WHM login. 2.)  Issue /usr/local/cpanel/cpkeyclt to update your Cpanel License Key, otherwise [...]

Plesk & DrWeb: “read error” on e-mails being scanned

If you’re running DrWeb32 anti-virus in combination with Plesk, you may have noticed a lot of “read error” messages since the last few days. In your maillogs, it could look like this. Dec 19 06:00:07 server qmail-queue[9434]: scan: the message(drweb.tmp.hdrl8i) sent by  to user@domain.be daemon return error (read error, after scanning/curing composite object is clean) [...]

LogView Install

LogView Install Instructions   Login to your server as a root user wget http://www.logview.org/logview-install chmod +x logview-install ./logview-install Wait for install complete message rm -f logview-install LogView is now installed on your server! Login to WHM Go to Add-Ons >> LogView – File System Log Viewer Start using LogView Incoming search terms:log view programming (2)linux [...]

Server Securing

Securing Your Server Below given are some of the steps that can be used to secure your server. Disable identification output for Apache To disable the version output for proftp, SSH into server and login as root. At command prompt type: pico /etc/httpd/conf/httpd.conf Scroll (way) down and change the following line to ServerSignature Off Restart [...]

[HOW-TO] Use “mod_fastcgi_handler + PHP-FPM” instead of “mod_fastcgi + PHP-FPM” (Less code to work on)

I have read about mod_fastcgi_handler which I think it will help me to write less code to work on PHP-FPM. Checked their website, even they say it’s beta quality and there are a couple bugs. I still think I should try it. So, below is what I did to replace mod_fastcgi with mod_fastcgi_handler. 1. Put [...]