How to redirect an HTTP connection to HTTPS in Apache webserver

HTTP to HTTPS

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: 192.168.0.100        www.mydomain.com mydomain.com 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 main.cf is too low. Solve Postfix queue file write error Edit postfix main.cf: nano /etc/postfix/main.cf and set the message size limit to a higher value. E.g. message_size_limit ... Read more