Sunday, March 13, 2011

Changing the System time having cPanel

1. Select the appropriate time zone from the /usr/share/zoneinfo directory. Time zone names are relative to that directory. (eg :- Pacific/Easter)

ls /usr/share/zoneinfo

2. Edit the /etc/sysconfig/clock text file so that it looks like this:

ZONE=”Pacific/Easter”
UTC=true
ARC=false
3. Move the following file: /etc/localtime to back

mv /etc/localtime /etc/localtime_bak

4. Create a new soft link for /etc/localtime.

ln -s /usr/share/zoneinfo/Pacific/Easter /etc/localtime

5. Set the Hardware clock by typing the following command

/sbin/hwclock –systohc

6. Verify the time by typing the command date.

Monday, February 28, 2011

How to redirect non-SSL/HTTP requests for Mailman to SSL/HTTPS

Create a custom .htaccess file for Mailman, as seen below:
Code:

# touch /usr/local/cpanel/3rdparty/mailman/cgi-bin/.htaccess
# chown -vv mailman:mailman /usr/local/cpanel/3rdparty/mailman/cgi-bin/.htaccess


Enter the following contents into the custom .htaccess file:
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Friday, February 25, 2011

How to change the temp directory of Mysql

Add the below line in your my.cnf file and restart the mysql
tmpdir = /path/to/mysqltempdirectory

Friday, January 21, 2011

Unable to start apache in plesk

If you are unable to start apache in linux plesk server, and if you are getting the following error in error logs;

Unable to open logs.

First you need to verify if ulimit is set.

Try executing the command:

echo $ulimit

If it is blank or a low value, try executing the command:

ulimit -n 65536

This should fix the issue.
Showing: 1-1 of 1
Comments

03 Sep, 2008 | Brijesh - KBModerator
In order to make this change permanent we need to edit /etc/sysctl.conf and add following lines
fs.file-max = 65536

run the following command
# /sbin/sysctl -w fs.file-max=65536

As a general rules whenever you met with an error while restarting apache in a plesk server, please try to rebuild apache configuration files by running
# /usr/local/psa/admin/sbin/websrvmng -a -v

Saturday, December 11, 2010

Fatal error: Class 'PMA_Message' not found in /usr/local/cpanel/base/3rdparty/phpMyAdmin/lib or phpMyAdmin Fatal: PMA_Message::rawError line 233 cp

You may also get asked for a username/password and when you put in the cPanel account information you get the Fatal error.

From the looks of it the cPanel accounts user has lost connection to the MySQL or be it that it does not know what the username/password is for the account to access MySQL. There is a simple fix.

Log into WHM
SQL Services
Change MySQL DB Owner Password
Select the User from the drop down list
Either put in the cPanel User’s password or Generate a new one
Change Password.
Done.

Log back in as the cPanel User and you should have access via phpMyAdmin again.

Comments and feed back welcome

Thursday, December 9, 2010

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessa

Fix for infinite loops
An error message related to this isRequest exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.or you may seeRequest exceeded the limit,probable configuration error,Use 'LogLevel debug' to get a backtrace, orUse 'LimitInternalRecursion' to increase the limit if necessary


RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]

Wednesday, December 1, 2010

Plesk failed to start due to drwebd service

service psa stopall

service psa start

OR

Running plesk without drweb.

In /etc/init.d/psa

comment out the line,
service_after_psa="drwebd"

then service psa stopall
service psa start

it should start without drweb