Plesk control panel issue and solution

Plesk Notes

Plesk Login and password from psa:

# mysql -u admin -p`cat /etc/psa/.psa.shadow`
mysql> use psa;
mysql> select * from clients where pname=’Client Name’;
select * from accounts where id=’3245′;

To find the password of an email account

# mysql -u admin -p`cat /etc/psa/.psa.shadow`
# use psa;

# select * from domains where name=’domainname’;

—> will get like given below.
-+———–+————-+
| 181 | 2005-09-22 | domainname

# select * from mail where dom_id=’181′;
—> will get like given below.
—-+————+——–+———+
| 265 | domainname | true | 784 | false | | false | false | false | any | -1 | 181 | 392 |

# select * from accounts where id=’784′;

To find the ftp password

# mysql -u admin -p`cat /etc/psa/.psa.shadow`
# use psa;
# select * from sys_users where home=’/home/httpd/vhosts/domainname’;
# select * from accounts where id =’712′;

Additional ftp account

http://kb.swsoft.com/en/415

FTP log in Plesk

/usr/local/psa/var/log/xferlog

How do I upgrade Plesk

http://kb.swsoft.com/en/230

How to setup a new server

http://www.grafxsoftware.com/faq.php/HOW-TO-Setup-a-PLESK-Dedicated-Server/1/4/

updater Icon missing in Plesk

RPM is located at the …/opt/updater directory in the Plesk distributive.

Plesk error ERROR: PleskFatalException

rm -rf /var/lib/rpm/__db.00*

Apache failed to start with the “No space left on device” error

These errors mean that there is no available IPC (inter-process communication) resources in the system, such as
semaphores or shared memory segments.

Script to delete semaphore process

ipcs -s | grep apache | perl -e ‘while () {@a=split(/\s+/); print `ipcrm sem $a[1]`}’
or
ipcs -s|grep apache|awk ‘{print $2}’|while read i; do ipcrm -s $i;done

webmail error “A fatal error has occurred DB Error: connect failed”

http://kb.swsoft.com/en/940

To find the history of load on a server

sar -q

How can we add the settings so as to access http://www.subdomain.com in Plesk

Create A record or CNAME record for the subdomain in DNS and add the following line in the file given below.

ServerAlias http://www.subdomain.maindomain.com
/var/www/vhosts/maindomain/subdomains//conf/vhost.conf

Reconfigure the domain and restart named and apache.

Reconfigure Domain:

/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=domain.com

Run stat

/usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=domainname

Fixing awstats after a Plesk 8.3 migration

http://nickforsale.com/fixstats/

cd /root
wget http://nickforsale.com/fixstats/fixstats.tar.gz
tar -xzf fixstats.tar.gz

Please note to change the directory path in fixstats.pl as /home/httpd/vhosts or /var/www/vhosts . By default the script is set to /var/www/vhosts

# ./fixstats.pl
fixstats v1.2
Usage: ./fixstats.pl [–all | –domain= | –verbose | –test | –help]

–all : Run statistics on all domains. May not be used in conjunction with –domain.
–domain : Run statistics on specified domain only. May not be used in conjunction with –all.
–verbose : Verbose mode. Displays domains as they are processed.
–test : Test mode. Does everything except call awstats. For debugging purposes mostly.
–help : This message.

Enable Full Country list is awstats

vi /usr/local/psa/etc/awstats/awstats.domainname.com-http.conf
uncomment the line LoadPlugin=”geoipfree”
Rerun the stats for the domain

How to change the mail server ip

/sbin/iptables -t nat -A POSTROUTING -p tcp –dport 25 -j SNAT –to-source

path to email accounts

/var/qmail/mailnames/domainname

Mail queue

command to see mails in queue:
/var/qmail/bin/qmail-qread

command to find the number of mails in a queue:
/var/qmail/bin/qmail-qstat

Clean Mail queue

Download qmail-remove tool from here

http://www.linuxmagic.com/opensource/qmail/qmail-remove/

qmail-remove -r -p “Online Banking” -i -v
qmail-remove -r -p mailer-daemon -i -v
qmail-remove -r -p bouncing -i -v

You can use third party programs like qmail-remove http://www.linuxmagic.com/opensource/qmail/qmail-remove to accomplish queue management in plesk control panel managed qmail

The Plesk control panel itself provides a modified version od qmHandle ( http://qmhandle.sourceforge.net/ )along with it that can be used with ease to manage the queue

To see the statistics of the queue:


/usr/local/psa/admin/bin/mailqueuemng -s
Messages in local queue: 0
Messages in remote queue: 0
Messages in todo queue: 0
Messages total: 0
Messages found: 0
Timestamp: 1215870834

From this you can see the status of qmails local,remote and todo list

If you wish to do a delivery of the queued messages now run the following command

/usr/local/psa/admin/bin/mailqueuemng -a

To list remote message queue:
/usr/local/psa/admin/bin/mailqueuemng -R

list local message queue:

/usr/local/psa/admin/bin/mailqueuemng -L

To delete messages with a particular pattern in the subject line

/usr/local/psa/admin/bin/mailqueuemng -S”text”

To delete all messages in the queue (Use with caution – possible data loss )

/usr/local/psa/admin/bin/mailqueuemng -D

To disable reverse lookups in qmail with Plesk, simply add -Rt0 to the server_args line in /etc/xinetd.d/smtp_psa

The server is overloaded with SPAM. There are many messages in queue. Mail is delivered slowly

http://kb.parallels.com/en/766

Many email messages are sent from PHP scripts on the server. How can I find what domains these scripts are running on – qmail wrapper

http://kb.parallels.com/article_22_1711_en.html

SMTP on different Port in Plesk

http://www.digitalmurph.com/wordpress/?p=15

a) add the following to /etc/services
smtp-26 26/tcp mail

b) Copy /etc/xinetd.d/smtp_psa to /etc/xinetd.d/smtp_psa-26
c) Change the first line from service smtp to service smtp-26
d) Restart xinetd

How to avoid reverse dns lookup in mail

http://kb.parallels.com/en/298

hard disk quota is not supported

http://forum.swsoft.com/showthread.php?t=41722

Add ‘usrquota’ to the options in fstab for home partition.
mount -o remount /home
then just ran:
quotaoff -av
quotacheck -avum
quotaon -av

Named error while starting

http://forum.swsoft.com/showthread.php?t=22212

1) cd /var/named/run-root/etc
2) mv named.conf named.conf.bak
3) cp named.conf.default named.conf
4) for x in `ls`; do /usr/local/psa/admin/sbin/dnsmng update $x; done;/etc/init.d/named restart

Some clients experience a 30-60 second delay when trying to send/receive mail with Plesk mail server.

http://kb.swsoft.com/en/298

Plesk backup

http://rshagrawal.blogspot.com/2008/06/how-to-configure-backup-on-plesk.html

Backup convert

/usr/local/psa/bin/backup-convert convert -o output_file_name backup_name

Mail wrapper

http://kb.swsoft.com/article_22_1711_en.html

Qmail faq

http://qmail.3va.net/qmailfaq.html

Maintaining your qmail server

http://www.qmailrocks.org/maintain.php

queuelifetime – The “queuelifetime” setting for qmail determines how long messages can stay in the queue. By
default, your qmail server will keep messages in the queue for 604,800 seconds, or 7 days. However, you can set a
custom queuelifetime by creating a file called /var/qmail/control/queuelifetime. The content of that file is a
single line containing a number which represents the number of seconds the queue will hold any given message. If
you want to set a custom queuelifetime, you might want to whip out the old calculator.

Squirrelmail 1.4.11 attachment issue

http://sourceforge.net/tracker/index.php?func=detail&aid=1805471&group_id=311&

amp;atid=100311

wget http://www.mycutelife.net/sanju/downloads/1.4.11_compose_attachments.patch
Then from the root of the SquirrelMail directory (/usr/share/psa-horde/sqmail) (where src, class, etc can be seen),
type:

patch -p0 domain name > Certificates and click Add New Certificate.
2. Specify the certificate properties:
* Certificate name. This will help you identify this certificate in the repository.
* Encryption level. Choose the encryption level of your SSL certificate. We recommend that you choose a
value more than 1024 bit.
* Specify your location and organization name. The values you enter should not exceed the length of 64
symbols.
* Specify the domain name for which you wish to generate an SSL certificate. For example:
http://www.your-domain.com.
* Enter the domain owner’s e-mail address.
1. Click Self-Signed. Your certificate will be generated and stored in the repository.
3. Return to the domain’s administration screen (Domain > domain name) and click Setup in the Hosting group.
4. Select the self-signed SSL certificate from the Certificate drop-down box.

If there is no Certificate drop-down box on the screen, this means that you are on a shared hosting account;
therefore, you need to upgrade your hosting package and purchase a dedicated IP address from your hosting provider.
5. Select the SSL support check box and click OK.

Info] Directory for files browsed via HTTPS(SSL)

Since Plesk 7 for Windows does not use httpsdocs directory, the files should be uploaded to httpdocs and they will
be accessible via both HTTP and HTTPS protocols.

Starting with Plesk 7.5, the ‘httpsdocs’ directory is used for ‘Shared SSL’ feature only

Custom error docs

For enabling this feacture you have to check the option “Custom Error Documents” in domain >> setup

http://www.jabwebsolutions.co.uk/support/knowledgebase/view/71

/how-do-i-setup-custom-error-pages-in-plesk.html

http://kb.parallels.com/en/1531

Plesk Frontpage issue:

http://kb.swsoft.com/en/909∞

http://kb.swsoft.com/en/751

“Access Denied” error when trying to log into Plesk

If you get a “Access Denied” error when trying to log into Plesk, it means that you are currently locked out because of too many bad login attempts. To resolve this issue do the following:

1. Log into the psa database.

mysql -uadmin -p$(cat /etc/psa/.psa.shadow) psa

2. All user sessions are stored in the table ‘lockout’ in the psa database. To unlock all users in this table delete the user’s entry from this table using the following query:

delete from lockout;

Changing the page title for the login screen

You can change the title for the control panel login screen.

cd /usr/local/psa/admin/htdocs/javascript
cp common.js common.js.back

open common.js and at the top of the page add this:

document.title = ‘**ENETER THE TEXT HERE**’;

How to reset Plesk admin Password

Linux Server :

Login to Linux server as root, and run following commands :

cd /usr/local/psa/admin/bin
export PSA_PASSWORD=’newpassword’
echo $PSA_PASSWORD
./ch_admin_passwd
export PSA_PASSWORD=
cat /etc/psa/.psa.shadow

Windows Server : Login to windows server via RDP as a administrator, then open command prompt and run following commands :

C:\Program Files\SWsoft\Plesk\admin\bin\plesksrvclient.exe (according to plesk location)

or

cd %plesk_dir%
cd admin\bin

Execute this “plesksrvclient.exe”, you will be prompted to enter the new password for your “admin” plesk user.

You can then log into the plesk interface again and use as normal.

Script to find vulnerable files in a server

cd /usr/src
wget http://www.mycutelife.net/sanju/downloads/script
bash script

Open file /root/hacks_details.txt and you will get all the details

Frame redirects

http://en.wikipedia.org/wiki/URL_redirection#Frame_redirects

URL Redirect

http://www.seocompany.ca/seo/url-redirect.html

How to check whether mod_rewrite is enabled on a server

http://www.wallpaperama.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html

OR

place the following lines in your .htaccess: Code:

Options +FollowSymLinks
Redirect /joomla.html http://www.joomla.org

note: if your site is located in subdomain example “test” you need to insert in .htaccess as: Code:

Options +FollowSymLinks
Redirect /test/joomla.html http://www.joomla.org

Now point your browser to: http://www.mysite.com/joomla.html

If it redirects you to joomla.org – mod_rewrite is working. If it gives you an error – mod_rewrite is not working.

Mamboo Installation issue in plesk 8.1.1

http://forum.swsoft.com/showthread.php?s=b7fea76a5b4647bd4b4c56766aa17745&

amp;postid=175106

When you log in to control panel, it can open in either a standard view, a simplified desktop view, or a combination of both.

The standard view is a customary view of the control panel divided into two main areas: navigation pane on the left and the main screen where operations are performed on the right.

The desktop view can show server statistics and shortcuts to the operations you frequently perform everything you may need can now be accessible from a single screen.

You can set the option through plesk admin login and the following steps will help you to select which type of interface to be used for accounts which are using a particular template.

Clients > Client templates > Click on the template to edit >> select the option “Only standard interface is
allowed” or ” Desktop and standard interface are allowed” or “Only Desktop interface is allowed”.

The following url will help in changing the interface of each accounts.

http://download1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-administrators-

guide/22919.htm

Enabling server-status

http://kb.swsoft.com/en/264

SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .example.com

Also

ExtendedStatus On

Error : command not in docroot in /etc/httpd/logs/suexec.log for .cgi files

cp -p /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec

Error “Symbolic link not allowed”

Check open_basedir restriction and give the following in .htaccess file

Options Indexes FollowSymLinks

Redirection Rule

Need to redirect all request to domain.com to http://www.domain.com

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

Installing eaccelerator

wget http://bart.eaccelerator.net/source/0.9.5.2/eaccelerator-0.9.5.2.tar.bz2
tar -xvzf eaccelerator-0.9.5.2.tar.bz2
tar -xvjf eaccelerator-0.9.5.2.tar.bz2
cd eaccelerator-0.9.5.2/
ls
phpize
./configure –enable-eaccelerator=shared
make
make install
edit the file /etc/php.d/eaccelerator.ini
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
/etc/init.d/httpd stop
/etc/init.d/httpd start

Upgrading ioncube loader

http://www.ioncube.com/loaders.php ———– download the latest version
http://blog.eukhost.com/webhosting/ioncube-installation-globally/ ———– steps

Download the latest version to some directory(htdocs). Copy the appropiate file (ioncube_loader_lin_4.4.so) to the
ioncube folder (normally /usr/local/ioncube). You can get the path from php.ini file (zend_extension =
/usr/local/ioncube/ioncube_loader_lin_4.3.so). Edit the above line in php.ini according to the version. Goto
http://servername/ioncube-loader-helper.php (where you downloaded the ioncube source file) and you will see as
below.

An ionCube encoded file has been loaded successfully.
Encoded files should now function correctly.

Get the following error when try to use PHPMyAdmin in the Plesk CP: “#1045 – Access denied for user ‘pma_xxxxxxx’@’localhost’ (using password: YES)”

http://kb.swsoft.com/en/1252

path to config.default.php is /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries and the path to config.inc.php is /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin . Then give necessary privileges

Plesk Error : Unable to connect to database: get_admin_password() failed: file_get_contents() failed: 0: /usr/local/psa/admin/auto_prepend/auth.php3:1 psaerror(string “Unable to connect to database: get_admin_password() failed: file_get_contents() failed: “)

Make sure that “/etc/psa/.psa.shadow” file has a valid permissions.
Right permissions should be as follows
-rw——- 1 psaadm psaadm 5 Feb 26 11:22 /etc/psa/.psa.shadow

Script to get mail password given a domain name:

#!/bin/bash
#Author Anoop Alias
#Email anoop@gnusys.net

psapass=`cat /etc/psa/.psa.shadow`
echo “Please Enter Mailname:”
read mailname
echo $mailname >/tmp/mailname
domain=`cut -d@ -f2 /tmp/mailname`
user=`cut -d@ -f1 /tmp/mailname`

echo “use psa;select id from domains where name=’gnusys’;” >/tmp/query1
sed -i s/gnusys/$domain/ /tmp/query1
id=`mysql -uadmin -p$psapass /tmp/query1
sed -i s/gnusys/$id/ /tmp/query1
sed -i s/idiot/$user/ /tmp/query1

id=`mysql -uadmin -p$psapass /tmp/query1
sed -i s/gnusys/$id/ /tmp/query1
mysql -uadmin -p$psapass Preferences.
It was implemented to avoid too many apache restarts if a lot of operations are done in Plesk CP. It doesn’t mean
that apache will be restarted every time of this period. If no one makes changes in Plesk CP then apache will not
be restarted, but if someone does, apache will be restarted not more often than once in the apache restart
interval.

Error make_sock: problem listening on port 443, file descriptor (1068) larger than FD_SETSIZE (1024)

Unable to open logs

Too many open files

http://kb.swsoft.com/en/260

http://kb.swsoft.com/en/2066

Do I need a new Certificate Signing Request (CSR) generated to renew a certificate?

In most situations you will not require to generate a new Certificate Signing Request (CSR) to renew an SSL
certificate because you can simply use the one we generated for you when you first purchased the certificate.
However, we are finding that many SSL certificate issuers are now requesting that a new CSR be generated for each
renewal. The reason that many certificate issuers will ask you to generate a new key pair and CSR to request a
certificate renewal is because by renewing your public key along with the certificate you help to protect against
the risk of the cryptographic key being compromised by a sustained computational attack over many years and
maintain improved security for your transactions. You should check with your specific SSL certificate issuer to
find out what their policy is with regards to renewals.

how to exclude an ip recording in webalizer

plesk>Reports>Webstats Preferencies>Hide Refferer

How to setup ssl for subdomain in plesk

http://www.webhostingtalk.com/archive/index.php/t-376301.html

URL to unblock ip that are blocked at hotmail

http://support.msn.com/eform.aspx?productK…&ct=eformts

Error “1054 – Unknown column ‘p.products_id’ in ‘on clause’”

http://forums.oscommerce.com/index.php?showtopic=230304

https://helpdesk.apollohosting.com/kb_article.php?ref=7683-NMUY-3161

http://www.totalchoicehosting.com/forums/index.php?showtopic=33948

Error “1054 – Unknown column ‘a.authors_id’ in ‘on clause’”

http://www.oscmax.com/forums/oscmax-v2-customization-mods/6535-1054-

unknown-column-authors_id-clause-2.html

To enable http://IP/~username in plesk use the following in httpd.conf

http://httpd.apache.org/docs/2.0/mod/mod_userdir.html

http://httpd.apache.org/docs/1.3/mod/mod_userdir.html

#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
# UserDir enable
#
# To enable requests to /~user/ to serve the user’s public_html
# directory, remove the “UserDir disable” line above, and uncomment
# the following line instead:
#
UserDir httpdocs

How do I enable cgi-scripts to run from httpdocs and httpsdocs directories

http://kb.parallels.com/en/193

FTP not working….. Connection closed by foreign host

http://mohammednv.wordpress.com/2008/04/16/ftp-not-working-

connection-closed-by-foreign-host/

Error “Error: This alias already exists” while creating domain

use psa;
select * from domainaliases where name=’yourdomainname.com’;
delete from domainaliases where name=’yourdomainname.com’;
select * from `dns_recs` where displayHost like ‘%yourdomainname.com%’;
delete from `dns_recs` where displayHost like ‘%yourdomainname.com%’;

Follow the steps given below if you still have issue

select * from dns_zone where displayName like ‘%yourdomainname.com%’;
delete from dns_zone where displayName like ‘%yourdomainname.com%’;
Then delete the named db file

Advertisements
Leave a comment

Leave your opinion

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: