General, Linux

404 error in Cloudlinux php selector

This error is happened due to lack of lvemanager on the server. To fix this, you should need to install lvemanager using the below command. Please note that cagefs should also be installed on the server.

yum install lvemanager

So, the complete steps will be like below.

Installation of different versions of PHP & modules:

$ yum groupinstall alt-php

Update CageFS & LVE Manager with support for PHP Alternatives
$ yum update cagefs lvemanager

cPanel/WHM: Make sure ‘Select PHP version’ is enabled in Feature Manager

=========<>========

Standard
cPanel, General, Linux

Error connecting to IMAP server: localhost.111 : Connection refused

If you are seeing this error in Squirrelmail in webmail

check whether imap and dovecot services are running fine using he below commands

root@server [~]# /etc/init.d/dovecot status
root@server [~]# telnet localhost 143
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.

If there is no issues with the services, then check an important part that most of them don’t notice.

CHECK /etc/hosts file

It should have an entry like below:

127.0.0.1 localhost.localdomain localhost localhost4.localdomain4 localhost4

=======<>=======

Standard
Apache, cPanel, General, Linux

Negotiation: discovered file(s) matching request

If you are seeing this error in Apache logs, Please see the Apache configuration file for the below entry.

Apache configuration file path : /usr/local/apache/conf/httpd.conf or /etc/httpd/conf/httpd.conf

Options Indexes FollowSymLinks MultiViews

The moment I removed the MultiViews option

everything started working fine.

=======<>=======

Standard
cPanel, General, Mysql

Error from MySQL query: DBD::mysql::db do failed: Can’t find any matching row in the user table at /usr/local/cpanel/Cpanel/Mysql.pm line 1196.

To fix this error:

Go to the mysql configuration and remove the parameter “skip-name-resolve”

vi /etc/my.cnf

remove skip-name-resolve

/etc/init.d/mysql restart

=====<>=====

Standard
cPanel, General, Linux

Ncdu — disk usage analyzer for linux

ncdu (NCurses Disk Usage) is a curses-based version of the well-known ‘du’, and provides a fast way to see what directories are using your disk space.

Implementaion
————–
http://dev.yorhel.nl/ncdu

wget http://dev.yorhel.nl/download/ncdu-1.10.tar.gz

tar -xvzf ncdu-1.10.tar.gz

cd ncdu-1.10
./configure
make
make install

Enter the directory and type command ncdu to get the disk usage details for the directory.

Have a try this. You will love it 🙂

Standard
Apache, cPanel, General, Linux

Enable mod_proxy_html in cPanel server

This module provides an output filter to rewrite HTML links in a proxy situation, to ensure that links work for users outside the proxy. It serves the same purpose as Apache’s ProxyPassReverse directive does for HTTP headers, and is an essential component of a reverse proxy.

For example, if a company has an application server at appserver.example.com that is only visible from within the company’s internal network, and a public webserver http://www.example.com, they may wish to provide a gateway to the application server at http://www.example.com/appserver/. When the application server links to itself, those links need to be rewritten to work through the gateway. mod_proxy_html serves to rewrite <a href=”http://appserver.example.com/foo/bar.html”>foobar</a&gt; to <a href=”http://www.example.com/appserver/foo/bar.html”>foobar</a&gt; making it accessible from outside.

For cPanel 11.46
—————–
mkdir ~/tmp_compile &&
cd ~/tmp_compile &&
wget http://apache.webthing.com/mod_proxy_html/mod_proxy_html.c &&
/usr/local/apache/bin/apxs -c -I/opt/xml2/include/libxml2 -L/opt/xml2/lib -l xml2 -i mod_proxy_html.c &&
echo ‘LoadModule proxy_html_module modules/mod_proxy_html.so’ | tee -a /etc/httpd/conf/includes/pre_main_global.conf
service httpd restart
For cPanel 11.42
—————–

kdir ~/tmp_compile &&
cd ~/tmp_compile &&
wget http://apache.webthing.com/mod_proxy_html/mod_proxy_html.c &&
/usr/local/apache/bin/apxs -c -I/usr/include/libxml2 -l xml2 -i mod_proxy_html.c &&

Standard