Posts Tagged ‘Linux’

Run CGI scripts in httpdocs

Plesk only allows .cgi files to be executed from cgi-bin but allows .pl files to be executed from anywhere. To allow .cgi to be executed from httpdocs add line to .htaccess: AddHandler cgi-script .cgi

Apache case insensitive URL’s

If your moving a site from a Windows host to Linux and all of the cases are messed up (Yes Windows is case-insensitive ), you could try to substitute through all the code to make sure the links are the correct case. If your lucky though, enable mod_speling and this should work: # Add the […]

Linux at command

A useful utility for scheduling one-off tasks. atq = view scheduled jobs at -c 7 = show command to be run in job number 7 atrm 7 = delete job number 7 at -m 08:50 2009-10-15 < updatejob = schedule a job to run the contents of updatejob or type: at -m 08:50 2009-10-15 then […]

Apache server status

Add the following to httpd.conf for resource troubleshooting: ExtendedStatus On SetHandler server-status Order deny,allow Deny from all Allow from myipaddress

Too many open files when several hundred domains in Plesk

With more than several hundred domains in plesk, issues can arise with too many open files. Solution: echo ‘ulimit -n 32768′ >> /etc/sysconfig/httpd Enabling piped logging his also helps greatly,: mysql -uadmin -p$(cat /etc/psa/.psa.shadow) -BAND psa -e ‘REPLACE INTO misc VALUES (“apache_pipelog”,”true”)’ /usr/local/psa/admin/bin/websrvmng -a To see the default open file limit per process: ulimit -n […]

Adding a secondary SMTP port in Plesk

Choose an unused port and add it to the /etc/services file, for example: smtp_alt 2525/tcp # new SMTP port Make a copy of /etc/xinetd.d/smtp_psa to /etc/xinetd.d/smtp_psa_alt and correct service line within new file: service smtp_alt Restart xinetd `/etc/init.d/xinetd restart` Edit the firewall, adding port 25025

Adding a second FTP account in Plesk

Sometimes it’s necessary to have two FTP users on a domain with access to the httpdocs and/or subdirectories, which Plesk doesn’t allow by default. # Create a web user in Plesk # Change the default directory to the required one and the userid to the same as the main FTP user grep ftpuser1 /etc/passwd usermod […]

Plesk SQL Queries

A few queries I put together to grab info from the Plesk database for troubleshooting: #FTP ACCOUNTS #———— SELECT account_id AS ‘ID’, login AS ‘USERNAME’, password AS ‘PASSWORD’, home AS ‘HOMEDIR’ FROM sys_users S, accounts A WHERE S.account_id = A.id; #MAIL ACCOUNTS #————- SELECT account_id AS ‘ID’, mail_name AS ‘USERNAME’, password AS ‘PASSWORD’, postbox as […]

Plesk for Linux – PCI Compliance

Courier Weak SSL Ciphers and SSLv2 The most common flaw uncovered by a PCI compliance scan is that a service is allowing SSL connections using weak SSL ciphers. Disable SSLv2 in Courier by adding the following line to both /etc/courier-imap/imapd-ssl and /etc/courier-imap/pop3d-ssl: TLS_CIPHER_LIST=”HIGH:MEDIUM:!SSLv2:!LOW:!EXP:!aNULL:@STRENGTH” After restarting Courier, test with openssl to confirm SSLv2 has been disabled […]