buy tb-500

Magento: Your web server is configured incorrectly.

December 14th, 2011 by ayad

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.

Parallels Plesk Panel returns error: SWKeyExFatalError

December 6th, 2011 by ayad

Symptoms

It is not possible to access to Parallels Plesk Panel. Browser displays the following error:

ERROR: SWKeyExFatalError
xmlrpc error: XML parsing failed


0: common_func.php3:4523
of_get_key_by_product(string ‘plesk-win’)
1: common_func.php3:4523
getPleskKey()
2: common_func.php3:4602
getKeyProp(string ‘demo’)
3: auth.php3:54

Also it is not possible to retrieve key number with utility keymng.exe, cause of unexpected error:
>”%plesk_bin%\keymng.exe” –get-key-number
Unexpected error

Resolution

Check the size of the file %plesk_dir%\admin\repository\registry.xml. If file is empty and equals 0KB, delete this file.
Once it is done, try to access to Parallels Plesk Panel. New file should be generated automatically.

Qmail : Display all Messages in the Email Queue

December 6th, 2011 by ayad

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

December 4th, 2011 by ayad
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

November 28th, 2011 by ayad

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

Thank you.

How to enable Fancy Directory Indexing in Apache 2.2

November 25th, 2011 by ayad
  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

October 27th, 2011 by ayad

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

Create Subdomain in plesk 10

October 18th, 2011 by ayad

To create subdomain in Plesk please follow the followinig steps:-

1) Log in to Plesk control Panel.

2) Click on “Domains” and then Click on “Control panel” in front of the domain whose files permession you want to change.

3) Click on “Websites and Domains“.

4) Click on “Add new Subdomain” option at the bottom of the page.

5) Enter the subdomain name that you want to enter and also define the document root of that subdomain.

6) Click on “OK” once you have entered the above details.

Can’t execute FLUSH PRIVILEGES: MySql error 1146:Table ‘mysql.servers’ doesn’t exist

October 9th, 2011 by ayad

If you got the below error once you tried to create database user

Add new database user failed: Can’t execute FLUSH PRIVILEGES: MySql error 1146:Table ‘mysql.servers’ doesn’t exist
———————- Debug Info ——————————-
0: plib\DatabaseManagerMySQL.php:83
DatabaseManagerMySQL->addUserToDatabaseImpl(string ‘tendy_test3’, string ‘*********’, string ‘trendy_test2′)
1: plib\DatabaseManager.php:163
DatabaseManager->createUser(object of type dbUser)
2: htdocs\domains\databases\db_usr_edit.php3:116

the solutions is below

got the below solutions for the same

Step 1: SSH to your server
Step 2: Open mysql by typing:

mysql -u YOURUSERNAMEHERE -p

Make sure to put in your own username. When you hit enter, you’ll be asked for your mysql password.

Step 3: Use the mysql database:

USE mysql;

Step 4: Place this code in to create the table:

CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
COMMENT=’MySQL Foreign Servers table’;

I hope that helps someone out there!

References.

http://forum.parallels.com/showthread.php?t=110100

FileList::init() failed: ls_dir_wrapper() failed: Unable to logon user (PLESK900W2K3\USER1): (1326) Logon failure: unknown user name or bad password.

October 2nd, 2011 by ayad

Resolution

Make sure that the account associated with the domain is active on the server. If it is disabled, you need to enable it by modifying properties of the account.

If account is enabled, the most possible reason of the issue is that the password of domain owner account is not synchronized with corresponding record in Parallels Panel database.
To fix that take the following steps:

1. Retrieve the password of the domain owner from Parallels Panel database with the command below (where USER1 is an owner of the domain, it can be taken from the error):

C:\> "%plesk_bin%"\dbclient --direct-sql --sql="select su.login, a.password from accounts a, sys_users su  where a.id=su.account_id and su.login='USER1'"

login       password
USER1  p@ssw0rd

2. Synchronize system password with accordance of retrieved one as follow:

C:\> net user USER1  p@ssw0rd
References
http://kb.parallels.com/6649