Install and Configure ISPConfig 3.1 on Ubuntu 18.04

Install and Configure ISPConfig 3.1 on Ubuntu 18.04

CHUONG K. NGUYEN – BSc., MCSEx2, MCSAx2, MCP, MCTS, MCITP, CCNA

Assume that we have Ubuntu Server 18.04 already installed and configured with an IP address. Follow the following steps to install ISPConfig 3.1.

Login as the root user and type

sudo su

Download and Install ISPConfig 3.1

cd /tmp; wget --no-check-certificate -O installer.tgz "https://github.com/servisys/ispconfig_setup/tarball/master"; tar zxvf installer.tgz; cd *ispconfig*; bash install.sh

Answer the questions to complete the installation as per below:

Would you like to update the hostname for this system? (recommended) (y/n): y
Please enter a fully qualified domain name (FQDN) (e.g. webserver.example.com): webserver.dalaris.com

Installing for this Linux Distribution: ubuntu-18.04
Is this correct? (y/n) y

Choose MySQL and hit OK.

Choose a secure password for MySQL and hit OK.

Choose Apache and hit OK.

Choose Yes to XCACHE and PHPMyAdmin.
Choose to install Dovecot mail server.
Choose yes to update antivirus database.
Choose yes to setup user quota.
Choose the Standard installation type.
Choose yes to install JailKit.
For SSL, country is CA. Province is ON. City is Toronto. Organization is Dalaris. Organizational Unit Name is IT.

When you see this screen, press ENTER:

Installing for this Linux Distribution: ubuntu-18.04
Is this correct? (y/n) y
Preparing to install… [DONE]
Updating apt package database and upgrading currently installed packages…
[DONE]

Installing basic packages (OpenSSH server, NTP, binutils, etc.)… [DONE]
Stopping AppArmor… [DONE]
Disabling AppArmor… [DONE]
Removing AppArmor… [DONE]
Changing the default shell from dash to bash… [DONE]
Installing Database server (MySQL)… [DONE]
Restarting MySQL… [DONE]
Installing Web server (Apache) and modules… [DONE]
Installing PHP and modules… [DONE]
Installing Opcache and APCu… [DONE]
Installing PHP-FPM… [DONE]
Installing needed programs for PHP and Apache (mcrypt, etc.)… [DONE]

=================================================================
Attention: When asked ‘Configure database for phpmyadmin with dbconfig-common?’ select ‘NO’
Due to a bug in dbconfig-common, this can’t be automated.
=================================================================
Press ENTER to continue…

Choose No for the screen below.

The system will now install all the components that we chose earlier.

After we see this we need to reset the password for ISPConfig and RoundCube.

Well done! ISPConfig installed and configured correctly :D

Now you can access to your ISPConfig installation at:

https://webserver.dalaris.com:8080 or https://10.0.0.71:8080

The default ISPConfig username is admin and the password is also admin

Warning: This is a security risk. Please change the default password after your first login.

You will need to edit the username and password in /var/lib/roundcube/plugins/ispconfig3_account/config/config.inc.php of the roundcube user, as the one you set in ISPconfig

To change ISPConfig password: Under System, CP Users, click admin, then change the password.

To change roundcube password, edit the file /var/lib/roundcube/plugins/ispconfig3_account/config/config.inc.php

Create a new Web Site

First, we need to create a new client called Client1. In ISPConfig, click Client. Click Add new Client. Fill in the information and click Save.

Click Sites and choose Add New Site. For this new site, choose Client1 as the client. Under domain, type site.dalaris.com. This is the URL for our web site.

Choose to enable SSL and specify Fast-CGI under PHP. Click Save when done.

Make sure you have your DNS pointing site.dalaris.com to the IP address of the server. Launch your favourite browser and go to http://site.dalaris.com. You will see your site here.

Securing the web site

Right now, the site is not secure. Click on the site and choose SSL tab. From here, fill in the information and choose to create a new SSL certificate. Click Save.

Next, we want to redirect all HTTP traffic to HTTPS. To do that, edit:

vi /var/www/site.dalaris.com/web/.htaccess

Enter contents as follows:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Now exit, save the file and restart Apache server:

service apache2 restart

From now on, when you access the site using HTTP, the site automatically redirects you to HTTPS which is more secure. Note that the site utilizes a self signed certificate which is treated as not secure by browsers. In the future, we will have to add a commercial certificate to this site to make it perfect.