How to chmod files only on Linux

Sometimes, you might want to apply a chmod to files only and not directories. This guide shows you three different ways to achieve that goal on the Linux command line. How to chmod files only One of the easiest ways is to use the find command to select the files and then run the chmod command with ... Read more

How to reset the MySQL root password

mySQL root password reset

The following steps describe the procedure to reset the MySQL root password on Linux. The same procedure works for MariaDB too. 1) Stop the MySQL server service mysql stop 2) Start the MySQL server manually without permission tables which allows us to login as root user without password: mysqld_safe --skip-grant-tables & 3) Login into MySQL ... Read more

How to redirect an HTTP connection to HTTPS in Apache webserver


HTTP connections can be redirected to HTTPS using the apache mod_rewrite module. Mod_rewrite should be available in every apache installation. Apache HTTP to HTTPS Redirect Create a file with the name .htaccess in the website root directory which contains the following lines: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} If you use ISPConfig 3, ... 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 access a name based website without a DNS record

Hosts file

If you want to access a name-based website that you created e.g. in ISPConfig before the DNS records are set up, edit the hosts file on your workstation computer and add a line like this: Edit hosts file on macOS X To edit the hosts file on a computer running macOS X, ... Read more

[Solved] Postfix: “queue file write error”

Postfix: Queue File Write Error

If you get an error like: Apr 15 12:41:03 webb4 postfix/sendmail[11234]: fatal: web1_user(12967): queue file write error in your mail log, then the value for message_size_limit in postfix is too low. Solve Postfix queue file write error Edit postfix nano /etc/postfix/ and set the message size limit to a higher value. E.g. message_size_limit ... 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

Get detailed information about server hardware and partitions on Ubuntu

Get Hardware info on Ubuntu

This short tutorial shows you 5 commands to get details about the system hardware of your PC, Notebook, or Server on Ubuntu and Debian. CPU details on Linux To get detailed information on the CPU, use this command: cat /proc/cpuinfo The output will look similar to this: cat /proc/cpuinfo processor       : 0 vendor_id       : AuthenticAMD ... Read more