FastCGI + suExec + PHP

In order to increase security on a webserver, especially on a shared host, using suExec and FastCGI to execute a PHP script as a normal user will add a level of security. For example, we have a vhost configured already:

Using Git

Below are some notes on how to use git from day to day.

Basics

 

Command Description

$ git config --global user.name "<your name>"
$ git config --global user.email "<your email>"

Disabling Weak and Medium Ciphers on Plesk

One of the things that Qualified Scanning Vendors look for on a server is that the server does not use weak AND medium strength ciphers. Plesk does come with a tool to enable you to switch off weak ciphers used with courier, Apache, and the control panel itself.

# /usr/local/psa/admin/bin/pci_compliance_resolver --enable all

This will disable all weak ciphers for courier mail, Apache, and the control panel. Other parameters are:

Reading an InputStream to a String

InputStreamReader isr = new InputStreamReader(conn.getInputStream());
BufferedReader br = new BufferedReader(isr);
StringBuffer sb = new StringBuffer();
String line;
while ((line = br.readLine()) != null)
{
     sb.append(line);
}
br.close();
result = sb.toString();
System.out.println(result);
  1. Get an Input Stream from an existing object such as a connection object and pass it as the parameter in the constructor of the InputStreamReader
  2. Create a new BufferedReader object and pass the newly created InputStreamReader throught

Plesk Backup Error: Specified file is not accessible

 I just did a kernel upgrade on the server and after making sure that the IPs and services were working properly I tried to backup a domain through the web interface and got this error:

Plesk Backup Error: Specified file is not accessible

I know that the location for Plesk back up files are located in /var/lib/psa/dumps

The owner was correct, psaadmin:psaadmin. Then I noticed that the tmp directories permissions were set to 700, so after running:

FTP per_source_limit Error

While trying to download and upload files via FTP, I was getting

Oct 11 15:19:39 209443-www2 xinetd[12269]: EXIT: smtp status=1 pid=8309 duration=0(sec)
Oct 11 15:19:39 209443-www2 xinetd[12269]: FAIL: ftp per_source_limit from=xxx.xxx.xxx.xxx

In order to fix this I had to modify the /etc/xinet.d/ftp_psa file. I did so by adding the bold lines to the file: