Entries categorized as ‘cPanel’
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: cPanel, log bytes error, mod_bwlimited, mod_log_bytes, mod_bandwidth, bandwidth, ‘BytesLog’
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: cPanel, ERROR: role "username" does not exist, Postgre DB, postgres, Postgresql, Unable to locate pgpass file, WHM
Error
root@hostname [~]# /etc/init.d/proftpd restart
Stopping proftpd: [FAILED]
Starting proftpd: hostname.domainname.com – fatal: Socket operation on non-socket
[FAILED]
Reason
The ProFtpd was configured to run in “inetd” mode. In “inetd” mode, ProFTPD expects that it will be run from the inetd super-server, which implies that stdin/stdout will be sockets instead of terminals. As a result, socket operations will fail.
root@hostname [~]# grep ServerType /etc/proftpd.conf
ServerType inetd
root@hostname [~]#
Fix
Edit the proftpd configuration and change the ServerType to “standalone” mode and restarted ProFtpd.
root@hostname [~]# grep ServerType /etc/proftpd.conf
ServerType standalone
#ServerType inetd
root@hostname [~]# /etc/init.d/proftpd restart
Stopping proftpd: [FAILED]
Starting proftpd: [ OK ]
For more details : http://www.proftpd.org/docs/faq/linked/faq-ch4.html
Categories: Linux tutorials · cPanel
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: Certificate for exim on hostname.domainname will expire in less then 30 days, courier-imapd, courier-pop3d, cPanel, Manager Service SSL Certificates
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: cPanel, open_basedir, protection, Security