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

Redirect domains without www (e.g. to with apache rewrite rules

Apache www redirect rule

If all your visitors shall access your website with a URL like and not without www, use the following apache rewrite rule for redirecting them. RewriteEngine On RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}$1 [L,R] The apache rewrite rule can be added in a .htaccess file in the website root directory or if you use ... Read more

Send all outgoing email trough one IP address in postfix

When a server has more than one IP address, then postfix will use all IP addresses randomly to send out emails. This can cause your emails to be listed as SPAM on other servers because the sending IP does not match the reverse IP of the server hostname. The solution is to bind postfix to ... Read more

Fix for Courier IMAP Error: check for configuration errors with the FAM/Gamin library

I've got the following error message on Debian Linux (6.0) with Courier IMAP server: Filesystem notification initialization error -- contact your mail administrator (check for configuration errors with the FAM/Gamin library) when I tried to access a IMAP share. The resaon for the problem seems to be that the "fam" package was not working correctly. ... Read more

Prevent DOS attacks on apache webserver for DEBIAN linux with mod_evasive

The following guide explains the installation of the apache module "mod_evasive". Mod_evasive tracks the number of requests of files at the apache webserver and blocks the delivery in case that a certain limit has been reached. Installation apt-get install libapache2-mod-evasive Create the log directory for mod_evasive mkdir -p /var/log/apache2/evasive chown -R www-data:root /var/log/apache2/evasive Now we ... Read more

How to enable port 587 (submission) in postfix

Some internet access providers have port 25 disabled in their routers to prevent spam. If you run your own mailserver in a datacenter, 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 mailserver. To enable port 587, edit the ... Read more

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

Have you ever searched where the virtual host of a website is defined in the apache config files? There is a handy option of the apache2ctl script which might help then. When you run the command: apache2ctl -S on the shell, you will get a list of all virtual hosts and default servers incl. the ... Read more

How to enable port 465 (smtps) in postfix mailserver

More and more internet access providers are closing port 25 to reduce spam except for connections to their own mailservers. If you run your own mailserver and have problems to connect to it on port 25, you can enable port 465 (smtps) in postfix as a workaround. Edit the /etc/postfix/ file: vi /etc/postfix/ and remove ... Read more

Webalizer stats only showing 1 or 2 days?

If webalizer statistics of your website are only showing the last 1 or two days instead of all days since the website has been created, you have to activate incremental processing in the webalizer configuration file (/etc/webalizer.conf or /etc/webalizer/webalizer.conf depending on the Linux distribution). vi /etc/webalizer/webalizer.conf Change the line: # Incremental     yes to: Incremental     yes

Some services are shown as “Offline” in the ISPConfig system monitor though they are running on the server.

ISPConfig checks the status of the services on localhost (IP: It may be that some of your services only allow connections to specific IP addresses and not (in Apache this is done with the Listen directive). If you allow connections to localhost the status will be shown correctly in the ISPConfig. Another possibility ... Read more