Posts Tagged ‘Linux’

SSH Tunnelling

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

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/mydomain.com/conf/ vi vhost.conf : <Location /repos> DAV svn SVNPath /var/www/vhosts/mydomain.com/svn/repos AuthType Basic AuthName “mydomain.com repository” AuthUserFile /var/www/vhosts/mydomain.com/svn/htpasswd 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 […]

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

Creating custom Spamassassin rules

example: body            Job_Scam_Rule  /craftmediadepartment|LOUWILLE ENGINEERING|ABLE TEXTILE DEPARTMENT/ describe        Job_Scam_Rule  “Spam is not allowed” score           Job_Scam_Rule  2000 2000 2000 2000 or header LOCAL_ED_SUBJECT      Subject =~ /\bED\b/ score LOCAL_ED_SUBJECT       40 needs to go in the users user_prefs file if allow_user_rules is enabled in local.cf. Otherwise can be done on a serverwide basis in /etc/mail/spamassassin/local.cf or similar manual: […]

screen on Linux

After installing screen you can have multiple sessions per ssh connection and they can be resumed if the connection is lost. type screen to start Now open a new window with “Ctrl-A” “c” You can create several windows and toggle through them with “Ctrl-A” “n” for the next window or “Ctrl-A” “p” for the previous […]

Configuring a samba server

install samba via yum etc. Create the smb.conf config file in /usr/local/samba/lib/smb.conf Basic smb.conf sample: [global] workgroup = DEVELOPMENT encrypt passwords = yes [homes] guest ok = no read only = no browseable = no

Installing Ruby on Rails on Plesk

To Install Ruby on Rails on a Plesk Server: yum groupinstall “Plesk 8.1 Ruby” yum install psa-miva (If Miva required) yum groupinstall “Plesk 8.1 FastCGI” (if FastCGI required) To Configure Ruby on Rails on a Plesk Server: 1. Create a domain in Plesk with Physical hosting. 2. Ensure that bin/bash access is enabled. 3. Ensure […]