Configure PostgreSQL to accept connections from network

wrote by Rafael Marangoni, from Consultoria Linux team. By default, on some distros, PostgreSQL will only accept connections from localhost. When you have only access from localhost (from localhost Apache, by example) everything is ok, but when you need that postgresql accepts connections for other hosts, you need to make some configs. First of all, ... Read more

Get a list of all virtual hosts which are defined in all apache configuration files

Have you ever looked in the apache config files to see where a website's virtual host is defined? The apache2ctl script has a useful option that could come in good here. When you execute the command, it should look like this: apache2ctl -S You'll obtain a list of all virtual hosts and default servers in ... Read more

Reduce CPU and Disk load of backup scripts with nice and ionice

Reduce CPU and Disk Load on Linux

Running a nightly backup script on a server system, such as a web hosting server, can result in a heavy load and longer latency for other processes, for example, HTML or .php pages load slowly during the backup because the backup script requires too many I/O or CPU resources. On Linux systems, two shell utilities ... Read more

How to enable port 587 (submission) in postfix

Postfix Port 587

Some internet access providers have port 25 disabled in their routers to prevent spam. If you run your own email server in a data center, you might have to enable the submission port (587) in postfix to be able to send emails from your local email client to your own mail server. Enable Submission Port ... Read more

Optimize MySQL Performance with Mysqltuner

MySQL Optimization

This short tutorial describes the steps to optimize the performance of a MySQL database with the mysqltuner script. This tool can be used for MySQL and MariaDB. Install mysqltuner The mysqltuner High-Performance MySQL Tuning Script is available as a package on Debian 10 and Ubuntu 20.04, install it with at: sudo apt install mysqltuner For ... Read more

[Solved] MySQL: Too many connections error

This guide shows you how to solve the error message "Connect to MySQL server 127.0.0.1: Too many connections". The error can appear in any log file of a service that connects to the MySQL server. This may e.g. be the /var/log/mail.log file if your email system uses a MySQL database. The error means that the ... Read more