buy tb-500

Archive for the ‘Linux’ Category

Magento: Your web server is configured incorrectly.

Wednesday, December 14th, 2011

Magento error: Your web server is configured incorrectly. As a result, configuration files with sensitive information are accessible from the outside. Please contact your hosting provider.

if you got the above error in Magento, you need to refer to the below solutions

The Fix:
644 for files, 755 for folders, and if you’re on shared hosting you can try setting app/etc/local.xml to 750 for security purposes.

Thank you.

Qmail : Display all Messages in the Email Queue

Tuesday, December 6th, 2011

SSH to the server and run the below command to show you the number of the queue

/var/qmail/bin/qmail-qstat

and run this command to list of the email queue

/var/qmail/bin/qmail-qread

Thank you.

Drive Warning: /dev/sda3 disk space is full

Sunday, December 4th, 2011
root@server2 [/usr]# cd local
root@server2 [/usr/local]# du -h --max-depth=1
2.8M    ./include
28K     ./man
33M     ./frontpage
15M     ./Zend
4.2M    ./lib
64K     ./les
3.0G    ./cpanel
360K    ./sim
6.0M    ./src
8.0K    ./games
66M     ./apache.backup_archive
108K    ./bandmin
1.7M    ./cpanel-rollback
35M     ./apache.backup
24K     ./sbin
12K     ./etc
15M     ./bin
40K     ./spri
152K    ./bfd
2.0M    ./IonCube
344K    ./share
8.0K    ./libexec
332M    ./apache
1005M   ./BUAgent

try to find the logs file, or which folder that using big size.
reverences

https://forums.cpanel.net/f189/drive-warning-dev-sda3-usr-86-full-please-help-105333.html

Delete spammer email Exim

Monday, November 28th, 2011

exim -bpr | grep spammer@abc.com | awk {‘print $3’} | xargs exim -Mrm

Thank you.

How to enable Fancy Directory Indexing in Apache 2.2

Friday, November 25th, 2011
  1. cd /usr/local/apache/conf/extra and verify that httpd-autoindex.conf exists. Don’t do anything with it, just make sure it is there.
  2. open /usr/local/apache/conf/httpd.conf and do a find and look for the section of the config where some “IfModule” entries exist. Then enter this module somewhere in that section:

    <IfModule mod_autoindex.c>
    IndexOptions FancyIndexing IconHeight=16 IconWidth=16
    </IfModule>

    (EDIT: HelloAdam suggested that we should use IconHeight=22 IconWidth=20 instead, as these are the values that Apache 1.3 used)

  3. Exit the edit session and save your work.
  4. Now you must “distill” the changes (assuming you are using Easy Apache). Enter this command:

    /usr/local/cpanel/bin/apache_conf_distiller –update

    You should get back “Distilled successfully”.

  5. Now you will rebuild your httpd.conf, and see if the changes you made stuck. Enter this command:

    /usr/local/cpanel/bin/build_apache_conf

    You should get back “Built /usr/local/apache/conf/httpd.conf OK”

  6. Open /usr/local/apache/conf/httpd.conf again, and make sure that your IfModule addition is still there. If so, success !!
  7. Restart Apache. I prefer to do it via WHM’s Restart Apache link. YMMV.

I have attached screen shots of a directory listing, BEFORE and AFTER.

I hope this is useful to someone.

references

http://forums.cpanel.net/f5/how-enable-fancy-directory-indexing-apache-2-2-a-105721.html

Install mod_Security in Centos

Thursday, October 27th, 2011

below is the steps to install Mod_security in Centos Linux server

1-    # yum install mod_security

2- you should see the below

Loaded plugins: downloadonly, fastestmirror, priorities, protectbase
Loading mirror speeds from cached hostfile
 * epel: www.gtlib.gatech.edu
 * base: mirror.skiplink.com
 * updates: centos.aol.com
 * addons: mirror.cs.vt.edu
 * extras: mirror.trouble-free.net
0 packages excluded due to repository protections
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package mod_security.x86_64 0:2.5.9-1.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================
 Package                                  Arch                               Version                                   Repository                        Size
==============================================================================================================================================================
Installing:
 mod_security                             x86_64                             2.5.9-1.el5                               epel                             935 k
Transaction Summary
==============================================================================================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 935 k
Is this ok [y/N]: y
Downloading Packages:
mod_security-2.5.9-1.el5.x86_64.rpm                                                                                                    | 935 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : mod_security                                      [1/1]
Installed: mod_security.x86_64 0:2.5.9-1.el5
Complete!
vi /etc/httpd/modsecurity.d/modsecurity_crs_10_config.conf
make sure this is one
SecRuleEngine On
service httpd restart
tail -f /var/log/httpd/error_log
simple out put
[Sat May 09 23:18:31 2009] [notice] caught SIGTERM, shutting down
[Sat May 09 23:18:33 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat May 09 23:18:34 2009] [notice] ModSecurity for Apache/2.5.9 (http://www.modsecurity.org/) configured.
[Sat May 09 23:18:34 2009] [notice] Original server signature: Apache/2.2.3 (CentOS)
[Sat May 09 23:18:34 2009] [notice] Digest: generating secret for digest authentication ...
[Sat May 09 23:18:34 2009] [notice] Digest: done
[Sat May 09 23:18:35 2009] [notice] Apache/2.2.0 (Fedora) configured -- resuming normal operations
Thank you

Domains missing from WHM cpanel

Sunday, August 21st, 2011

Did you try /scripts/updateuserdomains

Also please check the files /var/cpanel/users/username and /etc/trueuserdomains

Thank you.

Fantastico Installation

Friday, June 17th, 2011

cd /usr/local/cpanel/whostmgr/docroot/cgi
wget -N http://files.betaservant.com/files/free/fantastico_whm_admin.tgz
tar -xzpf fantastico_whm_admin.tgz
rm -rf fantastico_whm_admin.tgz

Plesk installation.

Friday, June 17th, 2011

Plesk
1. Go to http://www.parallels.com/download/plesk9 to look for installation file
2. create folder “Plesk” for installation file
a. create plesk folder in /root
b. #mkdir plesk
c. #cd plesk
3. command to download the installation file
a. #wget
http://download1.parallels.com/Plesk/PPP9/CentOS5/parallels_installer_v3.6.0_
build100407.15_os_CentOS_5_x86_64
4. command to change the file permission before install
a. #chmod +x parallels_installer_v3.6.0_build100407.15_os_CentOS_5_x86_64
5. command to start install
a. #./ parallels_installer_v3.6.0_build100407.15_os_CentOS_5_x86_64
6. install the necessary packages
a. PHP 5 support, ASP, backup manager, webmail
7. installation complete approximately 2 hours
8. after done install, Browse URL
a. https://IP:8443
b. enter username:admin
c. password:setup
9. Enter personal information
a. Company Name: Your company name
b. Contact Name: My Domains
c. Email: sreport@domain.com
d. office address
e. office location
f. State/province: Kuala Lumpur
g. Country: Malaysia

Direct Admin installation.

Friday, June 17th, 2011

1. Login as root and download the setup.sh file
# wget http://www.directadmin.com/setup.sh
Hint: Use “fetch” instead of “wget” on FreeBSD systems.
2. Change permissions on the setup.sh file
# chmod 755 setup.sh
3. Run the setup script!
# ./setup.sh
4. You will be prompted for a client ID number, license ID number, and hostname.