Monthly Archives: December 2009
Disable Zend using a .htaccess file
Some clients wish to disable zend on their site. This can be accomplished by creating a .htaccess file in their home folder with the following code: php_flag zend.ze1_compatibility_mode off
Cannot remove email account from cPanel
This can happen when switching the domain name on an account: Sorry, you do not have access to the domain domain.com Remove the following folders, if they exist: /home/user/mail/olddomain.com/xxx /home/etc/olddomain.com Locate and backup the following files: /home/user/.cpanel/ email_accounts.yaml email_accounts.cache Empty email_accounts.cache and edit email_accounts.yaml to remove the accounts/domain no longer required. If it still does …
Setting CGI to execute outside cgi-bin
The following line can be placed within a .htaccess file in the folder you wish to have CGI execution rights. Options +ExecCGI
Rebuild default virtual host
The following steps will rebuild the default virtual host within cPanel servers. You can edit the default host file via the following location: cd /var/cpanel/templates/apache2 Update the file vhost.default to your liking. Once the above is complete, run the following: /usr/local/cpanel/bin/build_apache_conf You will then need to update apache accordingly.
Apache Basics
Secure config file: vi /usr/local/apache-ssl/conf/httpd.conf Normal config file: vi /etc/httpd/conf/httpd.conf This command can be used especially when Apache is already running and you have just made a change in a configuration file. # /usr/local/bin/httpd.reload This command can be used especially if Apache is down and needs to be started up. # /usr/local/bin/httpd.reload –restart The Apache …
Check for bad blocks on a hard drive
Run this script to check for bad block on the hard drive. Replace /dev/sda3 with the drive that you wish to check. badblocks -vv /dev/sda3 > badblocks.log & It will check for badblocks and write it to a file called badblocks.log.
No listening sockets
httpd not running, trying to start no listening sockets available, shutting down Unable to open logs Look for log files greater than 2GB in size. This usually occurs when a log file grows too large or if the file system has been set to read only due to drive errors.
Prevent Image Hotlinking
Add The Following code to a .htaccess file in your home folder. RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com(/)?.*$ [NC] RewriteRule .*.(gif|jpg|jpeg|bmp)$ – [F,NC] In the example above be sure to replace domain.com with your actual domain name. This will stop other sites from hotlinking images that end in .gif, .jpg, .jpeg, and .bmp.
Force Exim to Upgrade on a Cpanel Server
If an exim upgrade fails use the following to force a fresh upgrade of exim and then check the exim system status /scripts/eximup –force service exim status How to Enable RBL’s in Exim via CPanel/WHM: The WHM now allows you to enable Spamhaus (zen.spamhaus.org) and SpamCop via the WHM Login to the WHM Click Exim …
Exim mail queue commands
Helpful Exim Commands: /usr/sbin/exim -M email-id => Force delivery of one message /usr/sbin/exim -qf => Force another queue run /usr/sbin/exim -qff => Force another queue run and attempt to flush the frozen message /usr/sbin/exim -Mvl messageID => View the log for the message /usr/sbin/exim -Mvb messageID => View the body of the message /usr/sbin/exim -Mvh …
- English Support
- 24/7 x 365
- Branded Support
- Reduced Overhead
- Linux Experts
- Friendly Staff