The Sky is not the limit

Entries tagged as ‘cPanel’

log bytes error: apache can not start

October 19, 2009 · Leave a Comment

Issue :-

When I restart Apache, it throws the following error.

/usr/local/apache/libexec/mod_log_bytes.so into server: /usr/local/apache/libexec/mod_log_bytes.so: cannot open shared object file: No such file or directory
Oct 13 07:47:48 web rc: Starting httpd: failed

Invalid command ‘BytesLog’, perhaps mis-spelled or defined by a module not included in the server configuration

Reason
The problem with this kind of symptom is most likely due to the cause that the mod_belimited.so, mod_log_bytes.so, or mod_bandwidth.so are deleted or corrupted. These 3 files are unique to cPanel-powered web hosting service and are used to control, monitor or restrict the bandwidth usage limit.

Fix
The resolution and solution to the error is to recompile and redeploy the missing or unable to find shared library modules. You can easily compile these cPanel modules for Apache by using the following commands:

cd /usr/local/cpanel/apache
/usr/local/apache/bin/apxs -iac mod_log_bytes.c
/usr/local/apache/bin/apxs -iac mod_bwlimited.c
/usr/local/apache/bin/apxs -iac mod_bandwidth.c

After compilation, the .so files will automatically copied to libexec directory for Apache HTTPD web server.

Categories: Linux tutorials · cPanel
Tagged: , , , , , ,

postgres ERROR: role “username” does not exist

October 19, 2009 · Leave a Comment

Issue 1

When I am trying to create Postgre DB using Cpanel, I get the following error:

Error from postgres wrapper: PostgreSQL has not been configured by the administrator. Unable to locate pgpass file.

Fix 1
You need to install a Postgres authentication configuration file that uses md5 passwords which works with cPanel. You can do this through WHM.

Login to WHM >> SQL Services >> Postgres Config >> Click on “Install Config”.

Issue 2
Okie  now I can create databases with new accounts. But already created accounts have  issues. It says  database created but it actually not creates and shows the following error in cPanel logs

tail -f /usr/local/cpanel/logs/error_log

ERROR:  role “username” does not exist
ERROR:  role “username” does not exist

Fix 2

Login to the server as “root” and execute the following command.

cd /var/cpanel/users && for x in *; do su -c “createuser -S -D -R $x” postgres; done

Categories: cPanel
Tagged: , , , , , ,

Certificate for exim will expire in 30 days

March 15, 2009 · Leave a Comment

ISSUE :-

I received 4 emails with following subjects.


Certificate for courier-imapd on hostname.domainname will expire in less then 30 days
Certificate for cpanel on hostname.domainname will expire in less then 30 days
Certificate for exim on hostname.domainname will expire in less then 30 days
Certificate for courier-pop3d on hostname.domainname will expire in less then 30 days

The contents in all of the emails is

Certificate for courier-imapd on hostname.domainname will expire in less then 30 days. You should install a new certifcate as soon as possible. You can install a new certificate in WHM under “Manager Service SSL Certificates”, or by clicking this link: https://hostname.domainname:2087/scripts2/manageservicecrts

Fix :-

Exim or the mail server uses self signed certificates for its services and is valid for one year. You need to renew the certificate in every year. You can renew the certificates from WHM as follows.

WHM login >> Main >> Service Configuration >> Manage Service SSL Certificates >> Reset Certificate


Categories: Linux tutorials · cPanel
Tagged: , , , ,

How to Disable/Enable open_basedir protection in cPanel servers?

March 14, 2009 · 3 Comments

You can easily Disable/Enable open_basedir protection in cPanel servers as follows.

Login to the WHM panel >> Main >> Security >> Security Center >> open_basedir protection

Here you can Disable/Enable the protection for particular domain or server wide.

Categories: Linux tutorials · cPanel
Tagged: , , ,

How to install GD/Curl in cPanel server?

March 14, 2009 · 4 Comments

In cPanel servers, the safest way to install PHP modules is to use the cPanel script for Apache-PHP compilation. You can do this as follows.

WHM login >> Main >> Software >> Apache Update
Or from the console execute /scripts/easyapache


Go through each step as follows.

1. Click “start customizing based on profile”
2. Select Apache Version – Click Next to proceed with the current version.
3. Select PHP Major Version – Click Next to proceed with the current version.
4. Select PHP Minor version – Click Next to proceed with the current version.
5. Short option list – Click Exhaustive Options List to view full options.
6 Exhaustive Options List – From here you can select the PHP modules you needed

In this case you need to select ‘GD’ and/or ‘CURL’
7. Click Save & Build to start apache-php compilation.

Once the compilation over you can verify the installed modules using the following command.

[root@servername ~]# php -m

Categories: Linux tutorials · cPanel
Tagged: , , , , , ,