ESDS Knowledge Base

15
Mar

The Perfect Server: Debian 6.0 with BIND and Courier [ISPConfig 3]

This post is about preparing Debian Squeeze (Debian 6.0) server to complete the work with a hosting control panel. ISPConfig 3 is a web control panel that lets you customize the following services through a web browser: web server Apache, Postfix mail server, MySQL, BIND, PureFTPd, SpamAssassin, ClamAV, and many more.

OpenVZ

If you installed the Perfect Server – Debian 6.0 [ISPConfig 3] is the establishment of a car OpenVZ (virtual machine OpenVZ), you must do it on a host system (I guess that OpenVZ container ID 101 – replace it correctly with VPSID on your system):

VPSID = 101
for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
do
vzctl set $ VPSID – capability $ {CAP}: on – save
done

SquirrelMail

Many people complain about the problems (such as getting 404 error Not Found ) using Web mail package SquirrelMail on their Web sites created by ISPConfig 3. This guide explains how to configure SquirrelMail on a server Debian Squeeze so that you can use it to your web site (created by ISPConfig).

Log that would be to read hidden text

cd / etc/apache2/conf.d /
ln-s .. / .. / squirrelmail / apache.conf squirrelmail.conf
/ Etc/init.d/apache2 reload

Now – / etc/apache2/conf.d/squirrelmail.conf defines an alias / squirrelmail, which indicates the installation directory of SquirrelMail in / usr / share / squirrelmail.

Now go to the line of PHP open_basedir settings in the tabs of your Web site in ISPConfig 3 and add the directories / usr / share / squirrelmail and / etc / squirrelmail (the directory in which the SquirrelMail configuration is stored) in a row, for example, as follows:

Wait for two or three minutes until ISPConfig 3 update site configuration. Now you can access SquirrelMail from your site to read by typing the link in the browser desktop PC:

http://www.example.com/squirrelmail

You can also access from the control panel ISPConfig virtual host as follows:

http://server1.example.com:8080/squirrelmail

If you would like to use a pseudonym for Web mail – / SquirrelMail, just open / etc/apache2/conf.d/squirrelmail.conf …

nano / etc/apache2/conf.d/squirrelmail.conf

… and add the line Alias ??/ webmail / usr / share / squirrelmail :

Alias ??/ squirrelmail / usr / share / squirrelmail Alias ??/ webmail / usr / share / squirrelmail <Directory /usr/share/squirrelmail> Options FollowSymLinks <IfModule mod_php5.c> php_flag register_globals off </ IfModule> <IfModule mod_dir.c> DirectoryIndex index . php </ IfModule> # access to configtest is limited by default to prevent information leak <Files configtest.php> order deny, allow deny from all allow from 127.0.0.1 </ Files> </ Directory> # users will prefer a simple URL like http://webmail.example.com # <VirtualHost 1.2.3.4> # DocumentRoot / usr / share / squirrelmail # ServerName webmail.example.com # </ VirtualHost> # redirect to https when available.

Note: There are multiple ways to do this, but choose the configuration that is suitable for # your site. Consult the apache documentation if # you’re unsure, as this example might not work everywhere. # # <IfModule Mod_rewrite.c> # <IfModule mod_ssl.c> # <Location /squirrelmail> # RewriteEngine on # RewriteCond% {HTTPS}! ^ On $ [NC] # RewriteRule. https ://%{ HTTP_HOST}% {REQUEST_URI} [L] # </ Location> # </ IfModule> # </ IfModule>

Then restart Apache:

/ Etc/init.d/apache2 reload

Now you can access Squirrelmail as follows:

http://www.example.com/webmail
http://server1.example.com:8080/webmail

If you want to define a virtual host, as webmail.example.com , where users can access SquirrelMail, you will have to add the following virtual host configuration to / etc/apache2/conf.d/squirrelmail.conf :

nano / etc/apache2/conf.d/squirrelmail.conf
[…] <VirtualHost 1.2.3.4:80> DocumentRoot / usr / share / squirrelmail ServerName webmail.example.com </ VirtualHost>

Make sure you replace 1.2.3.4 to the correct IP address of your server, and Apply for a DNS entry for webmail.example.com , which indicates the same that refers to the IP address that you use in your virtual host configuration. Also make sure that the virtual host webmail.example.com does not exist in the Dedicated Hosting Control Panel ISPConfig 3 (otherwise virtual domains will interfere with each other!).

Now restart Apache …

/ Etc/init.d/apache2 reload

… and you will be able to access SquirrelMail via http://webmail.example.com !

Leave a Reply