Archive for December, 2009

Plesk for Windows MySQL Access

Plesk uses two Mysql servers. One for clients databases (port 3306) and second server for Plesk databases (8306). You can connect to Plesk DB using the following command: %plesk_dir%\mysql\bin\mysql.exe -uadmin -pPlesk_admin_passwd -P8306 “C:\Program Files\Parallels\Plesk\Databases\MySQL\bin\mysql.exe” -uadmin -pPlesk-admin_passwd -P8306 Plesk-admin_passwd = “C:\Program Files\Parallels\Plesk\admin\bin\plesksrvclient.exe” -get However if you want to connect to Clients’ Mysql Server you should use […]

Configuring webdav on apache

enabled the mod_dav modules in httpd.conf add the following to vhost.conf <Directory /var/www/vhosts/> DAV On AuthType Digest AuthName “webdav” AuthUserFile “/var/www/vhosts/” require user test </Directory> You can test by: cadaver dav:!> open put,list,edit etc

SSH Tunnelling

Useful if access to a server is limited to selective IP addresses: ssh -i /home/me/.ssh/id_rsa -N -f -L3389:

Disable Track and Trace in Apache

TraceEnable off is available in Apache 1.3.34, 2.0.55 and later Otherwise you will need to add: RewriteEngine On RewriteCond %{REQUEST_METHOD} ^TRAC(E|K) RewriteRule .* – [F] to a /etc/httpd/conf.d/zz_020_disable_track_trace.conf and possibly to the individual vhost.conf’s

Plesk httpd suexec errors

If Apache is giving suexec errors following a httpd or Plesk upgrade, the Plesk suexec has probably been overwritten.  Copy it back: cp /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec

Subversion on Plesk

Installing Subversion on Plesk Servers with http authentication ————————————— yum install subversion mod_dav_svn service httpd restart cd /var/www/vhosts/ vi vhost.conf : <Location /repos> DAV svn SVNPath /var/www/vhosts/ AuthType Basic AuthName “ repository” AuthUserFile /var/www/vhosts/ Require valid-user </Location> cd .. mkdir svn cd svn svnadmin create repos htpasswd -c htpasswd ftpuser cd .. chown -R ftpuser:apache […]

Convert SSL from pem to pfx

Convert an SSL certificate from Apache pem to IIS pfx format. Copy the private key and certificate parts, from the PEM to their own files. Then: openssl pkcs12 -export -out ssl.pfx -in ssl.crt -inkey ssl.key This gave me a .pfx file i could import into IIS. If it’s an EV SSL, you can add the […]

POP3S IMAPS and SMTPS on Plesk

Setup SSL certificates for mail services (pop3s, imaps, smtps) on Plesk / Courier-Imap / Qmail Either get a certificate from a CA: openssl genrsa 1024 > host.key openssl req -new -nodes -key host.key -out host.csr Put the certificate received into host.crt or generate your own: openssl genrsa 1024 > host.key openssl req -new -x509 -nodes […]

SSH Tunnelling to local ports on Linux

1. firewall – ensure port 22 is open 2. ensure users have ssh access (in plesk by commenting lines in /usr/local/psa/var/root.controls.lock and granting a shell) 3. Ensure the sshd config allows it in /etc/ssh/sshd_config: AllowTcpForwarding yes comment out: PermitTunnel no service sshd restart

Test an email against Spamassassin

To run an email through spamassassin to test how “spamlike” it is, put email+ headers in file: cat file | spamassassin -t