The Perfect Server - Debian Wheezy (Apache2, BIND, Dovecot, ISPConfig 3)

Version 1.0
Author: Falko Timme
Follow me on Twitter

This tutorial shows how to prepare a Debian Wheezy server (with Apache2, BIND, Dovecot) for the installation of ISPConfig 3, and how to install ISPConfig 3. ISPConfig 3 is a webhosting control panel that allows you to configure the following services through a web browser: Apache or nginx web server, Postfix mail server, Courier or Dovecot IMAP/POP3 server, MySQL, BIND or MyDNS nameserver, PureFTPd, SpamAssassin, ClamAV, and many more. This setup covers Apache (instead of nginx), BIND (instead of MyDNS), and Dovecot (instead of Courier).

Please note that this setup does not work for ISPConfig 2! It is valid for ISPConfig 3 only!

I do not issue any guarantee that this will work for you!

 

1 Requirements

To install such a system you will need the following:

 

2 Preliminary Note

In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100 and the gateway 192.168.0.1. These settings might differ for you, so you have to replace them where appropriate.

 

3 The Base System

Insert your Debian Wheezy network installation CD into your system and boot from it. Select Install (this will start the text installer - if you prefer a graphical installer, select Graphical install):

Choose your language:

Then select your location:

If you've selected an uncommon combination of language and location (like English as the language and Germany as the location, as in my case), the installer might tell you that there is no locale defined for this combination; in this case you have to select the locale manually. I select en_US.UTF-8 here:

Choose a keyboard layout:

The installer checks the installation CD, your hardware, and configures the network with DHCP if there is a DHCP server in the network:

Enter the hostname. In this example, my system is called server1.example.com, so I enter server1:

Enter your domain name. In this example, this is example.com:

Afterwards, give the root user a password:

Confirm that password to avoid typos:

Create a normal user account, for example the user Administrator with the user name administrator (don't use the user name admin as it is a reserved name on Debian Wheezy):

Share this page:

19 Comment(s)

Add comment

Comments

From: Been Told

Stuck on point 15 on page 4.

The fstab file on my OVH vServer looks like this:

proc  /proc       proc    defaults    0    0

none  /dev/pts    devpts  rw          0    0

none  /dev/shm    tmpfs   rw          0    0

Where should I add the additional text? 

 

From: Daniel M. Sanchez

Hi, Im new in Linux, trying to set it up in EC2 from Amazon.  I tried it following the Centos tutorial, but after reboots it suddenly worked, so now trying with Debian. 

My first question here is... the instance will have a local private IP and a public ip assigned by the Elastic IP manager. Whichone do I have to set in the Network Configuration to make it accessible though the web?

thanks.

From: Tim

I installed ISPConfig on Debian 7.8. I can't send mails (mailclient or squirrelmail). Receiving is not a problem. the postfix config was set to inet_interfaces = all 

by default. The mail client doesn't connect. Can anybody help me?

From: Joey

Just ran updates and my server stopped sending/receiving as well. My configuration has been the same for many years, just ran an update and noticed no mail.

 

I tried to logon to my horde webmail and page is now blank with empty header or nav bar.

 

mail.log

debian dovecot: imap-login: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<2YMYH64PpwB/AAAB>Feb 22 06:30:04 debian postfix/smtpd[29191]: connect from localhost[127.0.0.1]Feb 22 06:30:04 debian postfix/smtpd[29191]: lost connection after CONNECT from localhost[127.0.0.1]Feb 22 06:30:04 debian postfix/smtpd[29191]: disconnect from localhost[127.0.0.1]Feb 22 06:30:04 debian dovecot: pop3-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<3zggH64PPwB/AAAB>

 

From: fakebot

What would cause "Could not resolve" for apt-get during step 12? Since enabling Apache mods Could not resolve happens for every apt-get.

From: Ben

I'm reading this toturial today, and now we have Debian 7.8.0 I have 3 questions...1) will I get in trouble following this tutorial that was written with Debian 7.0.02) Page 2 - when you say... simply choose Standard system utilities and SSH server for now we'll install the rest later will I get myself in trouble if I check "Debian desktop environment"3) page 3 #10General type of mail configuration: do you mean put in litteraly "Internet Site" or put "example.com"

From: till

1) The tutorial is fully compatible with all Debian 7.x versions.

2) You can do that, but it will slow down your server. Therefor you normally wont install a Desktop on a Linux server.

3) This is an option that you select, you will see that when you follow the tutorial.

From: Gianluca Pericoli

to have xxxx.com/phpmyadmin you also need to:

ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf service apache2 reload

From: peppi

nice tuto

after 1000x trying to install this pannel it finally worked

however 2 errors

1 is the jail.local file when i add that fail 2 ban wont start

2 is again that terrible warning [Fri Mar 27 20:29:57 2015] [warn] NameVirtualHost *:443 has no VirtualHosts

i can not figure out why i get this error

i did everything like described here and missed nothing everything went 110% until i got to the very last detail to secure the pannel

 

i am searching my ass of on the web for 5 days now and i just canot figure out what this problem is

i hope some one can answer this last question and the jail.local error

From: till

Regarding 1) Tro to use copy/paste. There ust be an error / typo in your file as the jail.local file from the tutorial above works fine. Just used it last week.

 

Regarding 2) This is no error, so no need to change anything. This message just means "Apache is is configured for SSL vhosts but you did not add one yet". So this is just a info message thats hows the correct installation of your server.

From: LuxeMat

base-installer: error: exiting on error base-installer/kernel/failed-installer

From: Krunal Adroja

Hello.

i have already installed Dedian Wheezy as local server now i want to make live server. please guide me needful.

thanks.

 

From: Kallee

Email to Gmail marked as spam. Attachement problem squirrelmailHello HowtoForge. This tutorial is great, I installed Debian 7.8.0 and everything is working, except for a few things.1) After sending an email to my gmail account it was marked as spam. Looking at the headers of the received email I noticed ip6 checks by the google mailservers, but my server uses ip4 DNS zones and records only. My internet connection and router are configured for ipv4 and ipv6 by my ISP. Solution: After some search I changed this in the postfix main.cf file: inet_protocols=all to inet_protocols = ipv4

restart postfix: /etc/init.d/postfix restart

Done.2) Squirrelmail attachment error: Unable to move/copy file... This took me a few hours, but this is what I did to make it work:2.1) Open /etc/squirrelmail/config.php and change the value of $attachement_dir = /var/spool/squirrelmail/attach/ into /var/lib/squirrelmail/tmp/2.2) Open /etc/php5/apache2/php.ini and change the value ;file_uploads = On into file_uploads = On . Further, I changed the default setting of max_filesize = 2M into max_filesize = 10M . And I changed the setting max_file_uploads = 20 into max_file_uploads = 4 .2.3) In the same php.ini file, edit the value of this line and set it to 12 (for example): post_max_size = 12M (otherwise the setting max_filesize = 10M doesn't work.2.5) Open /etc/php5_fpm/php.ini and do the same as you did in step 2.2 and 2.3Restart apache: /etc/init.d/apache2 restartDone. Hopefully this works for you too.

From: Michael

Thank you! It was a pleasure to work following your tutorial.

ISPConfig works great and I've bookmark your page on first place in my list of favorite how-tos.

From: Ailton

What happened with system if my ISP didnt add that OpenVZ config in my container? 

From: till

The perfect serevr guides do not contain support for OpenVZ containers as the openvz kernel conflicts with Linux harddisk quota. you can either host websites on a server or OpenVZ containers but not both. If you want to have a OpenVZ hosting server, please see OpenVZ installation tutorial on ispconfig.org and dont use the perfect server guide, which is for website, email and DNS hosting.

From: Marv

Awesome Tutorial! Works like a charm, thank's a lot for your work!

From: ori0n

What is the path to phpmyadmin?

From: till

The path is /phpmysdmin. So you can e,g, access it with http://yourhostname/phpmyadmin or http://yourip/phpmyadmin.