Reconfiguring a domain
/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=domain.com
/usr/local/psa/admin/sbin/statistics –calculate-one
–domain-name=yourdomain.comCommands for removing mail queue on plesk
==================================
Run this :
#qmailctl stop
#find /var/qmail/queue/mess -type f -exec rm {} \;
#find /var/qmail/queue/info -type f -exec rm {} \;
#find /var/qmail/queue/local -type f -exec rm {} \;
#find /var/qmail/queue/intd -type f -exec rm {} \;
#find /var/qmail/queue/todo -type f -exec rm {} \;
#find /var/qmail/queue/remote -type f -exec rm {} \;
#qmailctl start
qmailctl stop
find /var/qmail/queue/mess -type f -exec rm {} \;
find /var/qmail/queue/info -type f -exec rm {} \;
find /var/qmail/queue/local -type f -exec rm {} \;
find /var/qmail/queue/intd -type f -exec rm {} \;
find /var/qmail/queue/todo -type f -exec rm {} \;
find /var/qmail/queue/remote -type f -exec rm {} \;
qmailctl start
==================================
command for removing spam message with unique words.
==================================
eg : qmail-remove -r -q /var/qmail/queue/ -p usuarios -i -v
where ‘usuarious’ is the unique word contained in the spam mails. Replace
it with the word that your spam messages contains.
===================================
Restarting ftp service.
service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@host ~]# service xinetd status
xinetd (pid 23815) is running…
[root@host ~]# lsof -i tcp:21
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME xinetd 23815 root 5u IPv4
552944287 TCP *:ftp (LISTEN)
./f-prot -verno check for doctor web version.
/usr/local/f-prot/tools/
./check-updates.pl
===============
redirecting a domain into a folder.
RewriteEngine on
RewriteBase /
RewriteRule ^$ /shop/ where shop is the folder name.
===============
Useful vhost.conf entry and .htaccess entries.
==================
php_value magic_quotes_gpc 1
php_value allow_url_fopen 1
php_value register_globals 0
php_value session.cookie_lifetime 0
php_value session.cookie_secure 0
php_value session.name PHPSESSID
php_value session.referer_check 0
==================
Restoring a database using the bbackupquery.
==============
bbackupquery
cd var-lib-mysqldumps
echo “ls -dot var-lib-mysqldumps” | bbackupquery > results
cat results | grep pn.sql.gz
select according to date
cat results | grep pn.sql.gz | wc -l
get -i 0015be13 uspn.sql.gz
Restoring files and directories
IF you want to restore a file or a directory , you must be logged on the
server where the problem domain is.
Then type bbackupquery , this will automatically connect you on the
backup server .
After this type help to see a list of commands for future “help” and
“help command” for a command describe .
Type “ls” to view the current directories and “cd” to change the current
directory and go to the problem domain.you can view old files and
directory
with the command “ls -dot ”
IF you see something like 001bea42 f–o– 2007-04-27T05:48:58 index.html
this is an old files, there is f–o– “o” from old.Old directories has a
form of -dX— .
For directories restore type ” restore -r directory newdirectory ”
And for a single file restore type get -i id file .
ID is if you look at the above example is 001bea42 , so a restore of
that file will be done by typing : ” get -i 001bea42 index.html ”
==============
queries for getting the username and password for a particular domain
===========
select cl_id from domains where name=’test.com’; #gets client ID from
domain name
select login, account_id from clients where id=’145′; #gets account
ID and login from client ID
select password from accounts where id =’2761′; #gets password from
account ID
===========
Plesk log files.
=============
/var/log/mysqld.log mysql
/var/log/httpd/error_log http
/var/log/httpd/access_log http
/var/log/httpd/suexec_log http
/var/log/mailman mailman
/usr/local/psa/var/log/maillog maillog
=============
Important configuration files on plesk.
===============
/var/log/mysqld.log mysql
/var/log/httpd/error_log http
/var/log/httpd/access_log http
/var/log/httpd/suexec_log http
/var/log/mailman mailman
/usr/local/psa/var/log/maillog maillog
[22:17:17 plesk]$ cat conffiles
/var/named/run-root/etc/named.conf named
/var/named/run-root/var/ db files
/var/qmail/mailnames mailbox
/etc/psa/psa.conf plesk
/etc/psa/.psa.shadow plesk passwd
===============
Useful Commands
How to find out the user login of a database
==================================================
# To find out dom_id of the domain
select id from domains where name=’jasonreech.net’;
# To find out the databases, using dom_id
select * from data_bases where dom_id=’
# To find out user login from db_id
select login from db_users where db_id=’
Apache configuration and log files locations
======================================================
# Main apache configuration files
/etc/httpd/conf/httpd.conf
# Users apache configuration file is included in
/etc/httpd/conf.d/*_psa_httpd.conf
# Users apache configuration files
Include /home/httpd/vhosts/
Ex:- /home/httpd/vhosts/jasonreech.net/conf/httpd.include
# Apache’s log file is located in
/var/log/httpd/error_log
# Apache include files directory
/etc/httpd/conf.d/
# Aapche binary file
/usr/sbin/httpd
Qmail configuration and log files locations
====================================================
# qmail directory
/var/qmail
# Location of qmail maildirs
/var/qmail/mailnames/
# Log file location
/usr/local/psa/var/log/maillog
# Binary directory
/var/qmail/bin/
My Sql configuration file and log location
====================================================
# location of mysql
/var/lib/mysql
# Configuration File
/etc/my.cnf
# Log file
/var/log/mysqld.log
# Binary file
/usr/bin/mysql
BIND configuration file
============================
# Configuration File
/var/named/run-root/etc/named.conf
# Zone file location
/var/named/run-root/var/
Plesk configuration files
=============================
# Plesk admin password is located in
/etc/psa/.psa.shadow
#This is the same password for mysql root user
# plesk configuration file
/etc/psa/psa.conf
# plesk directory
/usr/local/psa
# Directory for the config dile is
/usr/local/psa/etc
#postgresql directory
/var/lib/pgsql/data
FTP configuration files and logs
=====================================
# FTP configuration file is
/etc/proftpd.conf
# FTP log file
/usr/local/psa/var/log/xferlog
# FTP bianry file
/usr/bin/ftp
Awstatics configurtion files and logs
=========================================
# Configuration file location
/etc/awstats/awstats.com
# Log file are located
/var/log/httpd/access_log
# Domains access logs
/home/httpd/vhosts/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/usr/local/psa/admin/bin/websrvmng -a
# create configuration files for all domains
/usr/local/psa/admin/bin/websrvmng -u –reconfigure-vhost
–vhost-name=
# webserver reconfiguration for one given host
/usr/local/psa/admin/bin/websrvmng -o =stop webserver
/usr/local/psa/admin/bin/websrvmng -p =start webserver
/usr/local/psa/admin/bin/websrvmng -r =restart websever
/usr/local/psa/admin/bin/websrvmng -s =webserver status
/usr/local/psa/admin/bin/webstatmng –set-configs
–stat-prog=(webalizer|awstats) –domain-name=
# generate webalizer or AWStats config for
/usr/local/psa/admin/bin/timemng –set-system-time –time=
# set system time
/usr/local/psa/admin/bin/timemng –get-system-time
# get system time
/usr/local/psa/admin/bin/timemng –set-timezone –timezone=
# set time zone
No comments:
Post a Comment