How to add PHP support for jailed SSH users in ISPConfig 3

ISPConfig PHP Jail

Jailkit is an easy-to-use tool to create and maintain jail environments for shell users on Linux. In this guide, I will show you how to move PHP and its dependencies into the jail so that the jailed user can execute PHP scripts inside the jail on an ISPConfig server. Edit the jailkit .ini file and ... Read more

Redirect a subdomain in Apache and keep the URL in the address bar

Apache Redirect

This tutorial shows you how to use redirect rules in the Apache web server. If you want to redirect a subdomain like sub.domain.tld into a subdirectory of the website and keep the original URL in the browser location bar, you may use the following apache directive. RewriteEngine on RewriteCond %{HTTP_HOST} ^sub.domain.tld [NC] RewriteRule ^/(.*)$ /sub/$1 ... Read more

How to convert filenames or text to lowercase on the Linux command line

Linux tolower command

There is no simple 'tolower' command on the bash, but you can convert uppercase characters to lowercase with a little shell script. The script uses the tr command internally for converting the chars. Create a shell script with the name 'tolower' that converts all text that is given as a command-line argument to lower case: ... Read more

How to speed up logins in pure-ftpd on Debian or Ubuntu Linux by disabling name resolution

PureFTPD DontResolve

If you experience problems with slow logins in pure-ftpd, this is often caused by a problem with the resolving of the client's hostname. This happens e.g. when you run an FTP server in your intranet and the hostname of the client computer does not exist in DNS. Disable PureFTPD name resolver To disable name resolving ... Read more

How to enable verbose logging in pure-ftpd on Debian and Ubuntu

PureFTPD Verbose Log

To turn on verbose logging (e.g. to debug FTP connection or authentication problems) in pure-ftpd FTP server on Debian and Ubuntu Linux. Enable debug log in pure-ftpd Execute the following command as root user in the shell to enable verbose logging: echo 'yes' > /etc/pure-ftpd/conf/VerboseLog and then restart pure-ftpd, for init based systems: service pure-ftpd-mysql ... Read more

Configure fail2ban to use route instead of iptables to block connections

Fail2ban route command

Fail2ban uses iptables by default to block incoming connections when they exceed the max.  login retries. The iptables rules used by fail2ban might conflict with other firewall rules, so it might be necessary to reconfigure fail2ban to use the route command for blocking incoming connections. Fail2ban ban using route command To reconfigure fail2ban for using ... Read more