The Perfect Server - Ubuntu 14.04 (nginx, BIND, MySQL, PHP, Postfix, Dovecot and ISPConfig 3)

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Wed, 2014-05-07 11:33. :: BIND | ISPConfig | Linux | Ubuntu | Email | FTP | MySQL | nginx | Postfix

The Perfect Server - Ubuntu 14.04 (nginx, BIND, MySQL, PHP, Postfix, Dovecot and ISPConfig 3)

Version 1.0
Author: Falko Timme, updated by Srijan Kishore
Last edited 28/Apr/2014

This tutorial shows how to prepare an Ubuntu 14.04 (Trusty Tahr) server (with nginx, 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 nginx (instead of Apache), BIND (instead of MyDNS), and Dovecot (instead of Courier).

If you want to use nginx instead of Apache with ISPConfig, please note that your nginx version must be at least 0.8.21, and you must install PHP-FPM as well. For CGI/Perl support, you must use fcgiwrap. This is all covered by this tutorial.

Please note that you cannot use this tutorial for Debian Squeeze because Squeeze comes with an older nginx version (0.7.67.) and does not have a PHP-FPM package!

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 Ubuntu install CD into your system and boot from it. Select your language:

Click to enlarge

Then select Install Ubuntu Server:

Click to enlarge

Choose your language again (?):

Click to enlarge

Then select your location:

Click to enlarge

I will continue here as India location, configure keyboard as No &  I select English(US) here: 

Click to enlarge


Click to enlarge


Click to enlarge

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

Click to enlarge

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

Click to enlarge

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


Click to enlarge


Click to enlarge


Click to enlarge


Click to enlarge


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Pete Williams (not registered) on Sat, 2014-07-19 21:42.

I found another solution to the 502 error when attempting to access ISPConfig when using nginx.  I used the instructions here:

http://stackoverflow.com/questions/23443398/nginx-error-connect-to-php5-fpm-sock-failed-13-permission-denied

The issue is related to PHP update to mitigate security risk per this page:
  1. Open /etc/php5/fpm/pool.d/www.conf
  2. Remove comment prefix # from all permission lines, like:

    listen.owner = www-data

    listen.group = www-data

    listen.mode = 0660
  3. Restart fpm - sudo service php5-fpm restart