Cpanel

All posts in the Cpanel category

Disable Directory Browsing in Linux Apache Server

Published May 14, 2011 by Siva

Disable directory browsing using .htaccess:-
Open your .htacces file

Look for Options Indexes
If Options Indexes exists modify it to Options -Indexes or else add Options -Indexes as a new line
The directory browsing feature should be disable by now

Disable directory browsing using httpd.conf:-

Open your httpd.conf, normally it’s located at /usr/local/apache/conf or /etc/httpd.conf
Go to your own Virtual Host settings and look for “Options Indexes”
Change the Indexes to -Indexes if Option Indexes exists or else add the Options -Indexes line
Restart your apache web server.

The directory browsing feature should be disable by now

Disable directory browsing in CPanel Share Hosting enviroment:-

Login to your CPanel
Click on Index Manager
Directory will be list down. Click on the directory name which you want to disable the directory browsing
Select No Index and click Save

The directory browsing feature should be disable by now
Once you disable directory browsing, visitor will not able to browse your directory by accessing the directory directly (if there is no index.html file).
This will protect your files from exposing to the public.

Upgrading perl 5.8.8 in C-Panel server

Published March 24, 2011 by Siva

The version of perl (v5.8.7) is too old. There are known problems that cannot be worked around with this version of perl. It is HIGHLY recommended that you upgrade to v5.8.8 or later. Any module install failures should be ignored until perl has been upgraded as some modules will not be able to install with this version of perl.

You can ensure that each installed module gets carried over to the updated Perl build with the use of the “autobundle” CPAN feature.

You can create a bundle of the currently installed modules by executing the following while logged in via SSH as root:

perl -MCPAN -e ‘autobundle’

Once completed, you should see the following output before getting returned to the shell:

‘Wrote bundle file /home/.cpan/Bundle/Snapshot_2007_08_16_00.pm’

Once you’ve made note of this file name, you can proceed with the update.

On linux based systems, you should be able to update Perl using the installer provided at layer1.cpanel.net:

cd /root
wget http://layer1.cpanel.net/perl588installer.tar.gz
tar -zxf perl588installer.tar.gz
cd perl588installer
./install -optimize-memory

On FreeBSD based systems, you will need to install Perl from ports.

This will take a few minutes, so take a coffee break and check the status when you return. Once the update has completed, you can install all previously installed modules from the CPAN bundle by executing the following (with the bundle name adjusted to the name of the bundle generated earlier):

perl -MCPAN -e ‘install Bundle::Snapshot_2007_08_16_00’

This should install each of the modules present in the bundle, assuming there are no issues during the installation (dependencies, network, etc).

Once this has completed, execute the following to ensure that all modules required by cPanel are installed, and restart cPanel:

/usr/local/cpanel/bin/checkperlmodules

Cpanal – Mail not receiving error R=central_filter T=**bypassed**

Published September 4, 2010 by Siva

Recently I got very interesting issue and it took very long time to figure our. The problem was I was able to send/receive email to other accounts but not able to send/receive to my own account means test@test.com to test@test.com. Here is what I was getting in error logs (Cpanel server).

gin:test@test.com S=789 id=63311.122.252.239.20.1239477600.squirrel@test.com
2009-04-11 14:20:00 1LsikC-00037z-NP => /dev/null
R=central_filter T=**bypassed**

Then here is what I found in cpanel forums:

central_filter refers to the email filters you’ve set up in cPanel – stored in /etc/vfilters/. Looks like you’ve got a filter set up to drop certain emails.

Then I renamed my domain name files in /etc/vfilters/ and I got this fixed, hope this will help you