The Perfect Server - Debian 10 (Nginx, BIND, Dovecot, ISPConfig 3.2)

This tutorial shows how to prepare a Debian 10 server (with Nginx, BIND, Dovecot) for the installation of ISPConfig 3.2, and how to install ISPConfig 3.2. ISPConfig 3 is a web hosting 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 web server, BIND as DNS Server, and Dovecot as IMAP / POP3 server.

1 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. Before proceeding further you need to have a minimal installation of Debian 10. This might be a Debian minimal image from your hosting provider or you use the Minimal Debian Server tutorial to setup the base system.

All commands below are run as root user. Either log in as root user directly or log in as your normal user and then use the command

su -

to become root user on your server before you proceed. IMPORTANT: You must use 'su -' and not just 'su', otherwise your PATH variable is set wrong by Debian.

2 Install the SSH Server

If you did not install the OpenSSH server during the system installation, you can do it now:

apt-get -y install ssh openssh-server

From now on you can use an SSH client such as PuTTY and connect from your workstation to your Debian 10 server and follow the remaining steps from this tutorial.

3 Install a shell text editor (Optional)

I'll use the nano text editor in this tutorial. Some users prefer the classic vi editor, therefore I will install both editors here. The default vi program has some strange behavior on Debian and Ubuntu; to fix this, we install vim-nox:

apt-get -y install nano vim-nox

(You don't have to do this if you use a different text editor such as joe.)

4 Configure the Hostname

The hostname of your server should be a subdomain like "server1.example.com". Do not use a domain name without subdomain part like "example.com" as hostname as this will cause problems later with your mail setup. First, you should check the hostname in /etc/hosts and change it when necessary. The line should be: "IP Address - space - full hostname incl. domain - space - subdomain part". Edit /etc/hosts. Make it look like this:

nano /etc/hosts
127.0.0.1       localhost.localdomain   localhost
192.168.0.100   server1.example.com     server1

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Then edit the /etc/hostname file:

nano /etc/hostname

It shall contain only the subdomain part, in our case:

server1

Finally, reboot the server to apply the change:

reboot

Log in again and check if the hostname is correct now with these commands:

hostname
hostname -f

The output shall be like this:

[email protected]:/tmp# hostname
server1
[email protected]:/tmp# hostname -f
server1.example.com

5 Update Your Debian Installation

First make sure that your /etc/apt/sources.list contains the buster/updates repository (this makes sure you always get the newest updates for the ClamAV virus scanner - this project publishes releases very often, and sometimes old versions stop working), and that the contrib and non-free repositories are enabled.

nano /etc/apt/sources.list
deb http://deb.debian.org/debian/ buster main contrib non-free
deb-src http://deb.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

Run

apt-get update

to update the apt package database and

apt-get upgrade

to install the latest updates (if there are any).

6 Change the Default Shell

/bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore we do this:

dpkg-reconfigure dash

Use dash as the default system shell (/bin/sh)? <-- No

If you don't do this, the ISPConfig installation will fail.

7 Synchronize the System Clock

It is a good idea to synchronize the system clock with an NTP (network time protocol) server over the Internet. Simply run

apt-get install ntp

and your system time will always be in sync.

8 Install Postfix, Dovecot, MySQL, rkhunter, and binutils

We can install Postfix, Dovecot, MySQL, rkhunter, and Binutils with a single command:

apt-get install postfix postfix-mysql postfix-doc mariadb-client mariadb-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-sieve dovecot-lmtpd sudo curl

You will be asked the following questions:

General type of mail configuration: <-- Internet Site
System mail name: <-- server1.example.com

To secure the MariaDB / MySQL installation and to disable the test database, run this command:

mysql_secure_installation

We don't have to change the MariaDB root password as we just set a new one during installation. Answer the questions as follows:

Change the root password? [Y/n] <-- y
New password: <-- Enter a new database root password
Re-enter new password: <-- Repeat the database root password
Remove anonymous users? [Y/n] <-- y
Disallow root login remotely? [Y/n] <-- y
Remove test database and access to it? [Y/n] <-- y
Reload privilege tables now? [Y/n] <-- y

Next, open the TLS/SSL and submission ports in Postfix:

nano /etc/postfix/master.cf

Uncomment the submission and smtps sections as follows and add lines where necessary so that this section of the master.cf file looks exactly like the one below. IMPORTANT: Remove the # in front of the lines that start with smtps and submission too and not just from the -o lines after these lines!

[...]
submission inet n - y - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
# -o smtpd_recipient_restrictions=
# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
smtps inet n - y - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
# -o smtpd_recipient_restrictions=
# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
[...]

Restart Postfix afterwards:

service postfix restart

We want MariaDB to listen on all interfaces, not just localhost, therefore we edit /etc/mysql/mariadb.conf.d/50-server.cnf and comment out the line bind-address = 127.0.0.1:

nano /etc/mysql/mariadb.conf.d/50-server.cnf
[...]

# Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. #bind-address = 127.0.0.1

[...]

Save the file. Then set the password authentication method in MariaDB to native so we can use PHPMyAdmin later to connect as root user:

echo "update mysql.user set plugin = 'mysql_native_password' where user='root';" | mysql -u root

Edit the file /etc/mysql/debian.cnf and set the MYSQL / MariaDB root password there twice in the rows that start with the word password.

nano /etc/mysql/debian.cnf

The MySQL root password that needs to be added is shown in red. In this example, the password is "howtoforge".

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = root
password = howtoforge
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = root
password = howtoforge
socket = /var/run/mysqld/mysqld.sock
basedir = /usr

To prevent the error 'Error in accept: Too many open files' we will set higher open file limits for MariaDB now.

Open the file /etc/security/limits.conf with an editor:

nano /etc/security/limits.conf

and add these lines at the end of the file.

mysql soft nofile 65535
mysql hard nofile 65535

Next, create a new directory /etc/systemd/system/mysql.service.d/ with the mkdir command.

mkdir -p /etc/systemd/system/mysql.service.d/

and add a new file inside:

nano /etc/systemd/system/mysql.service.d/limits.conf

paste the following lines into that file:

[Service]
LimitNOFILE=infinity

Save the file and close the nano editor.

Then we reload systemd and restart MariaDB:

systemctl daemon-reload
systemctl restart mariadb

Ignore the warning: "Warning: The unit file, source configuration file or drop-ins of mariadb.service changed on disk. Run 'systemctl daemon-reload' to reload units.".

Install the dbconfig-common system:

apt-get install dbconfig-common dbconfig-mysql

There is currently a problem with the Debian dbconfig-common system which prevents the installation of RoundCube later, fix it by running this command:

sed -i -r 's/_dbc_nodb="yes" dbc_mysql_exec/_dbc_nodb="yes"; dbc_mysql_exec/g' /usr/share/dbconfig-common/internal/mysql

Now check that networking is enabled. Run

netstat -tap | grep mysql

The output should look like this:

[email protected]:~# netstat -tap | grep mysql
tcp6       0      0 [::]:mysql              [::]:*                  LISTEN      4027/mysqld
[email protected]:~#

9 Install Amavisd-new, SpamAssassin, and ClamAV

To install amavisd-new, SpamAssassin, and ClamAV, we run:

apt-get install amavisd-new spamassassin clamav clamav-daemon unzip bzip2 arj nomarch lzop cabextract p7zip p7zip-full unrar lrzip apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl libdbd-mysql-perl postgrey

The ISPConfig 3 setup uses amavisd which loads the SpamAssassin filter library internally, so we can stop SpamAssassin to free up some RAM:

systemctl stop spamassassin
systemctl disable spamassassin

10 Install Nginx, PHP (PHP-FPM), and Fcgiwrap

Nginx is available as a package for Debian which we can install as follows:

apt-get install nginx

If Apache2 is already installed on the system, stop it now...

systemctl stop apache2

The message "Failed to stop apache2.service: Unit apache2.service not loaded." is fine and does not indicate an error.

... and remove Apache's system startup links:

systemctl disable apache2

Start nginx afterwards:

systemctl start nginx

(If both Apache2 and nginx are installed, the ISPConfig 3 installer will ask you which one you want to use - answer nginx in this case. If only one of these both is installed, ISPConfig will do the necessary configuration automatically.)

We can make PHP 7.3 work in nginx through PHP-FPM (PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites) which we install as follows:

apt-get install php7.3-fpm

PHP-FPM is a daemon process that runs a FastCGI server on the socket /var/run/php/php7.3-fpm.sock.

To get MySQL support in PHP, we can install the php7.3-mysql package. It's a good idea to install some other PHP modules as well as you might need them for your applications. You can search for available PHP modules like this:

apt-cache search php7

Pick the ones you need and install them like this:

apt-get install php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli php7.3-cgi php-pear mcrypt imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring memcached php7.3-soap php7.3-fpm php7.3-opcache php-apcu

Next open /etc/php/7.3/fpm/php.ini...

nano /etc/php/7.3/fpm/php.ini

... and set cgi.fix_pathinfo=0 and your timezone:

[...]
cgi.fix_pathinfo=0
[...]
date.timezone="Europe/Berlin"
[...]

(You can find all available timezones in the /usr/share/zoneinfo directories and its subdirectories.)

Now reload PHP-FPM:

systemctl restart php7.3-fpm

To get CGI support in nginx, we install Fcgiwrap.

Fcgiwrap is a CGI wrapper that should work also for complex CGI scripts and can be used for shared hosting environments because it allows each vhost to use its own cgi-bin directory.

Install the fcgiwrap package:

apt-get install fcgiwrap

After the installation, the fcgiwrap daemon should already be started; its socket is /var/run/fcgiwrap.socket. If it is not running, you can use the fservice fcgiwrap script to start it.

That's it! Now when you create a nginx vhost, ISPConfig will take care of the correct vhost configuration.

10.1 Install phpMyAdmin

Since Debian 10, PHPMyAdmin is not available as .deb package anymore. Therefore we will install it from source.

Create folders for PHPMyadmin:

mkdir /usr/share/phpmyadmin
mkdir /etc/phpmyadmin
mkdir -p /var/lib/phpmyadmin/tmp
chown -R www-data:www-data /var/lib/phpmyadmin
touch /etc/phpmyadmin/htpasswd.setup

Go to the /tmp directory and download the PHPMyAdmin sources:

cd /tmp
wget https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-4.9.0.1-all-languages.tar.gz

Unpack the downloaded archive file and move the files to the /usr/share/phpmyadmin folder and clean up the /tmp directory.

tar xfz phpMyAdmin-4.9.0.1-all-languages.tar.gz
mv phpMyAdmin-4.9.0.1-all-languages/* /usr/share/phpmyadmin/
rm phpMyAdmin-4.9.0.1-all-languages.tar.gz
rm -rf phpMyAdmin-4.9.0.1-all-languages

Create a new config file for PHPMyaAdmin based on the provided sample file:

cp /usr/share/phpmyadmin/config.sample.inc.php  /usr/share/phpmyadmin/config.inc.php

Open the config file with nano editor:

nano /usr/share/phpmyadmin/config.inc.php

Set a secure password (blowfish secret) which must be 32 chars long:

$cfg['blowfish_secret'] = 'bD3e6wva9fnd93jVsb7SDgeiBCd452Dh'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

Don't use my example blowfish secret, set your own one!

Then add a line to set the directory which PHPMyAdmin shall use to store temporary files:

$cfg['TempDir'] = '/var/lib/phpmyadmin/tmp';

In the next step, we will configure the phpMyadmin configuration store (database).

Log into MariaDB as root user:

mysql -u root -p

In the MariaDB shell, create a new database for PHPMyAdmin:

MariaDB [(none)]> CREATE DATABASE phpmyadmin;

Then create a new user:

MariaDB [(none)]> CREATE USER 'pma'@'localhost' IDENTIFIED BY 'mypassword';

Replace the word mypassword with a secure password of your choice in the commands above and below, use the same password both times. Then grant the user access to this database and reload database permissions.

MariaDB [(none)]> GRANT ALL PRIVILEGES ON phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT

Finally, load the SQL tables into the database:

mysql -u root -p phpmyadmin < /usr/share/phpmyadmin/sql/create_tables.sql

Enter the MariaDB root password on request.

All we have to do now is to set the phpmyadmin user details in the configuration file. Open the file in nano editor again:

nano /usr/share/phpmyadmin/config.inc.php

Scroll down until you see the lines below and edit them:

/* User used to manipulate with storage */
$cfg['Servers'][$i]['controlhost'] = 'localhost';
$cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'mypassword';

/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';

I've marked the lines in red which I've edited. Replace mypassword with the password that you've chosen for the phpmyadmin user. Note that the // in front of the lines have been removed as well!

After you have installed ISPConfig 3.2, you can access phpMyAdmin as follows:

The ISPConfig apps vhost on port 8081 for nginx comes with a phpMyAdmin configuration, so you can use http://server1.example.com:8081/phpmyadmin or http://server1.example.com:8081/phpMyAdmin to access phpMyAdmin.

If you want to use a /phpmyadmin or /phpMyAdmin alias that you can use from your websites, this is a bit more complicated than for Apache because nginx does not have global aliases (i.e., aliases that can be defined for all vhosts). Therefore you have to define these aliases for each vhost from which you want to access phpMyAdmin.

To do this, paste the following into the nginx Directives field on the Options tab of the web site in ISPConfig later:

        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_param PATH_INFO $fastcgi_script_name;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }

If you use https instead of http for your vhost, you should add the line fastcgi_param HTTPS on; to your phpMyAdmin configuration like this:

        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
                       fastcgi_param HTTPS on; # <-- add this line
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_param PATH_INFO $fastcgi_script_name;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }

If you use both http and https for your vhost, you can use the $https variable. Go to the nginx Directives field again, and instead of fastcgi_param HTTPS on; you add the line fastcgi_param HTTPS $https; so that you can use phpMyAdmin for both http and https requests:

        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
                       fastcgi_param HTTPS $https; # <-- add this line
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_param PATH_INFO $fastcgi_script_name;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }

11 Install Let's Encrypt

ISPConfig is using acme.sh now as Let's Encrypt client. Install acme.sh using the following command:

curl https://get.acme.sh | sh -s

12 Install Mailman

ISPConfig allows you to manage (create/modify/delete) Mailman mailing lists. If you want to make use of this feature, install Mailman as follows:

apt-get install mailman

Select at least one language, e.g.:

Languages to support: <-- en (English)
Missing site list <-- Ok

Before we can start Mailman, a first mailing list called mailman must be created:

newlist mailman

[email protected]:~# newlist mailman
Enter the email of the person running the list:
 <-- admin email address, e.g. [email protected]
Initial mailman password: <-- admin password for the mailman list
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases' program:

## mailman mailing list
mailman:              "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"

Hit enter to notify mailman owner...
 <-- ENTER

[email protected]:~#

Open /etc/aliases afterwards...

nano /etc/aliases

... and add the following lines:

[...]
## mailman mailing list
mailman:              "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"

Run

newaliases

afterwards and restart Postfix:

systemctl restart postfix

Then start the Mailman daemon:

systemctl restart mailman

After you have installed ISPConfig 3, you can access Mailman as follows:

The ISPConfig apps vhost on port 8081 for nginx comes with a Mailman configuration, so you can use http://server1.example.com:8081/cgi-bin/mailman/admin/<listname> or http://server1.example.com:8081/cgi-bin/mailman/listinfo/<listname> to access Mailman.

If you want to use Mailman from your web sites, this is a bit more complicated than for Apache because nginx does not have global aliases (i.e., aliases that can be defined for all vhosts). Therefore you have to define these aliases for each vhost from which you want to access Mailman.

To do this, paste the following into the nginx Directives field on the Options tab of the web site in ISPConfig:

        location /cgi-bin/mailman {
               root /usr/lib/;
               fastcgi_split_path_info (^/cgi-bin/mailman/[^/]*)(.*)$;
               include /etc/nginx/fastcgi_params;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_param PATH_INFO $fastcgi_path_info;
               fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
               fastcgi_intercept_errors on;
               fastcgi_pass unix:/var/run/fcgiwrap.socket;
        }

        location /images/mailman {
               alias /usr/share/images/mailman;
        }

        location /pipermail {
               alias /var/lib/mailman/archives/public;
               autoindex on;
        }

This defines the alias /cgi-bin/mailman/ for your vhost, which means you can access the Mailman admin interface for a list at http://<vhost>/cgi-bin/mailman/admin/<listname>, and the web page for users of a mailing list can be found at http://<vhost>/cgi-bin/mailman/listinfo/<listname>.

Under http://<vhost>/pipermail you can find the mailing list archives.

13 Install PureFTPd and Quota

PureFTPd and quota can be installed with the following command:

apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool

Edit the file /etc/default/pure-ftpd-common...

nano /etc/default/pure-ftpd-common

... and make sure that the start mode is set to standalone and set VIRTUALCHROOT=true:

[...]
STANDALONE_OR_INETD=standalone
[...]
VIRTUALCHROOT=true
[...]

Now we configure PureFTPd to allow FTP and TLS sessions. FTP is a very insecure protocol because all passwords and all data are transferred in clear text. By using TLS, the whole communication can be encrypted, thus making FTP much more secure.

If you want to allow FTP and TLS sessions, run

echo 1 > /etc/pure-ftpd/conf/TLS

In order to use TLS, we must create an SSL certificate. I create it in /etc/ssl/private/, therefore I create that directory first:

mkdir -p /etc/ssl/private/

Afterwards, we can generate the SSL certificate as follows:

openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem

Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., "DE").
State or Province Name (full name) [Some-State]:
<-- Enter your State or Province Name.
Locality Name (eg, city) []:
<-- Enter your City.
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
<-- Enter your Organization Name (e.g., the name of your company).
Organizational Unit Name (eg, section) []:
<-- Enter your Organizational Unit Name (e.g. "IT Department").
Common Name (eg, YOUR name) []:
<-- Enter the Fully Qualified Domain Name of the system (e.g. "server1.example.com").
Email Address []:
<-- Enter your Email Address.

Change the permissions of the SSL certificate:

chmod 600 /etc/ssl/private/pure-ftpd.pem

Then restart PureFTPd:

systemctl restart pure-ftpd-mysql

Edit /etc/fstab. Mine looks like this (I added ,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 to the partition with the mount point /):

nano /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=45576b38-39e8-4994-b8c1-ea4870e2e614 / ext4 errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 1
# swap was on /dev/sda5 during installation
UUID=8bea0d1e-ec37-4b20-9976-4b7daaa3eb69 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0

To enable quota, run these commands:

mount -o remount /
quotacheck -avugm
quotaon -avug

14 Install BIND DNS Server

BIND can be installed as follows:

apt-get install bind9 dnsutils

If your server is a virtual machine, then it is highly recommended to install the haveged daemon to get a higher entropy for DNSSEC signing. You can install haveged on non-virtual servers as well, it should not hurt.

apt-get -y install haveged
systemctl enable haveged
systemctl start haveged

An explanation on that topic can be found here.

15 Install Webalizer, AWStats and GoAccess

Webalizer and AWStats can be installed as follows:

apt-get install webalizer awstats geoip-database libtimedate-perl libclass-dbi-mysql-perl

Open /etc/cron.d/awstats afterwards...

nano /etc/cron.d/awstats

... and comment out everything in that file:

#MAILTO=root

#*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh

# Generate static reports:
#10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh

Installing the latest GoAccess version directly from GoAccess repository:

echo "deb https://deb.goaccess.io/ $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/goaccess.list
wget -O - https://deb.goaccess.io/gnugpg.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/goaccess.gpg add -
apt-get update
apt-get install goaccess

16 Install Jailkit

Jailkit is needed only if you want to chroot SSH users. It can be installed as follows (important: Jailkit must be installed before ISPConfig - it cannot be installed afterwards!):

apt-get install build-essential autoconf automake libtool flex bison debhelper binutils
cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.20.tar.gz
tar xvfz jailkit-2.20.tar.gz
cd jailkit-2.20
echo 5 > debian/compat
./debian/rules binary

You can now install the Jailkit .deb package as follows:

cd ..
dpkg -i jailkit_2.20-1_*.deb
rm -rf jailkit-2.20*

17 Install Fail2ban and UFW Firewall

This is optional but recommended, because the ISPConfig monitor tries to show the log:

apt-get install fail2ban

To make fail2ban monitor PureFTPd and Dovecot, create the file /etc/fail2ban/jail.local:

nano /etc/fail2ban/jail.local
[pure-ftpd]
enabled = true
port = ftp
filter = pure-ftpd
logpath = /var/log/syslog
maxretry = 3

[dovecot]
enabled = true
filter = dovecot
logpath = /var/log/mail.log
maxretry = 5

[postfix-sasl]
enabled = true
port = smtp
filter = postfix[mode=auth]
logpath = /var/log/mail.log
maxretry = 3

Restart fail2ban afterwards:

systemctl restart fail2ban

To install the UFW firewall, run this apt command:

apt-get install ufw

18 Install RoundCube

Install RoundCube with this command:

apt-get install roundcube roundcube-core roundcube-mysql roundcube-plugins

The installer will ask the following questions:

Configure database for roundcube with dbconfig.common? <-- yes
MySQL application password for roundcube: <-- press enter
Password of the databases administrative user: <-- enter the MySQL root password here.

Then edit the RoundCube /etc/roundcube/config.inc.php file and adjust a few settings:

nano /etc/roundcube/config.inc.php

Set the default_host to localhost and the smtp_server.

$config['default_host'] = 'localhost';
$config['smtp_server'] = 'localhost';
$config['smtp_port']  = 25;

ISPConfig has some configuration in the nginx apps vhost for squirrelmail which works for roundcube as well. We activate it with:

ln -s /usr/share/roundcube /usr/share/squirrelmail

http://192.168.0.100:8081/webmail
http://server1.example.com:8081/webmail
(after you have installed ISPConfig, see the next chapter)

Roundcube on Nginx

19 Install ISPConfig 3

Before you start the ISPConfig installation, make sure that Apache is stopped (if it is installed - it is possible that some of your installed packages have installed Apache as a dependency without you knowing). If Apache2 is already installed on the system, stop it now...

systemctl stop apache2

... and remove Apache's system startup links:

update-rc.d -f apache2 remove

Make sure that nginx is running:

systemctl start nginx

(If you have both Apache and nginx installed, the installer asks you which one you want to use: Apache and nginx detected. Select server to use for ISPConfig: (apache,nginx) [apache]:

Type nginx. If only Apache or nginx are installed, this is automatically detected by the installer, and no question is asked.)

To install ISPConfig 3.2 from the latest released version, do this:

cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/

The next step is to run

php -q install.php

This will start the ISPConfig 3 installer. The installer will configure all services like Postfix, Nginx, Dovecot, etc. for you.

# php -q install.php

--------------------------------------------------------------------------------
_____ ___________ _____ __ _ ____
|_ _/ ___| ___ \ / __ \ / _(_) /__ \
| | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ /
| | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ |
_| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \
\___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/
__/ |
|___/
--------------------------------------------------------------------------------

>> Initial configuration
Operating System: Debian 10.0 (Buster) or compatible
Following will be a few questions for primary configuration so be careful.
Default values are in [brackets] and can be accepted with <ENTER>.
Tap in "quit" (without the quotes) to stop the installer.

Select language (en,de) [en]: <-- Hit Enter
Installation mode (standard,expert) [standard]: <-- Hit Enter
Full qualified hostname (FQDN) of the server, eg server1.domain.tld [server1.canomi.com]: <-- Hit Enter
MySQL server hostname [localhost]: <-- Hit Enter
MySQL server port [3306]: <-- Hit Enter
MySQL root username [root]: <-- Hit Enter
MySQL root password []: <-- Enter your MySQL root password
MySQL database to create [dbispconfig]: <-- Hit Enter
MySQL charset [utf8]: <-- Hit Enter
Apache and nginx detected. Select server to use for ISPConfig: (apache,nginx) [apache]: <-- nginx

Configuring Postgrey
Configuring Postfix
Generating a 4096 bit RSA private key
.......................................................................++
........................................................................................................................................++
writing new private key to 'smtpd.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]: <-- Enter 2 letter country code
State or Province Name (full name) [Some-State]: <-- Enter the name of the  state
Locality Name (eg, city) []: <-- Enter your city
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter company name or press enter
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (e.g. server FQDN or YOUR name) []: <-- Enter the server hostname, in my case: server1.example.com
Email Address []: <-- Hit Enter
Configuring Mailman
Configuring Dovecot
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring BIND
Configuring Jailkit
Configuring Pureftpd
Configuring Nginx
Configuring vlogger
[INFO] service Metronome XMPP Server not detected
Configuring UFW Firewall
Configuring Fail2ban
[INFO] service OpenVZ not detected
Configuring Apps vhost
Installing ISPConfig
ISPConfig Port [8080]:
Admin password [admin]: <-- Enter desired ISPConfig admin user password here
Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]: <-- Hit Enter
Generating RSA private key, 4096 bit long modulus
.......................++
................................................................................................................................++
e is 65537 (0x10001)
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]: <-- Enter 2 letter country code
State or Province Name (full name) [Some-State]: <-- Enter the name of the  state
Locality Name (eg, city) []: <-- Enter your city
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter company name or press enter
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (e.g. server FQDN or YOUR name) []: <-- Enter the server hostname, in my case: server1.example.com
Email Address []: <-- Hit Enter
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: <-- Hit Enter
An optional company name []: <-- Hit Enter
writing RSA key

Configuring DBServer
Installing ISPConfig crontab
no crontab for root
no crontab for getmail
Detect IP addresses
Restarting services ...
Installation completed.

The installer automatically configures all underlying services, so no manual configuration is needed.

Afterward you can access ISPConfig 3 under http(s)://server1.example.com:8080/ or http(s)://192.168.1.100:8080/ ( http or https depends on what you chose during installation). Log in with the username admin and the password admin (you should change the default password after your first login):

ISPConfig Login page

ISPConfig Dashboard on Debian 10

Finally, we fix some permissions of the RoundCube installation.

chown root:ispapps /etc/roundcube/debian-db.php
chmod 640 /etc/roundcube/debian-db.php
chown root:ispapps /etc/roundcube/config.inc.php
chmod 640 /etc/roundcube/config.inc.php
chown -R ispapps:adm /var/log/roundcube
chmod -R 750 /var/log/roundcube
chown -R ispapps:ispapps /var/lib/roundcube/temp
chmod -R 750 /var/lib/roundcube/temp

The system is now ready to be used.

There exist some plugins to integrate RoundCube Webmail with ISPConfig, have a look here for the ISPConfig RoundCube plugin installation instructions.

21 Virtual machine image download of this tutorial

This tutorial is available as ready to use virtual machine image in ovf/ova format that is compatible with VMWare and Virtualbox. The virtual machine image uses the following login details:

SSH / Shell Login

Username: administrator
Password: howtoforge

Username: root
Password: howtoforge

ISPConfig Login

Username: admin
Password: howtoforge

MySQL Login

Username: root
Password: howtoforge

The IP of the VM is 192.168.0.100, it can be changed in the file /etc/network/interfaces. Please change all the above passwords to secure the virtual machine.

Share this page:

Suggested articles

58 Comment(s)

Add comment

Comments

By: pzajda

Thanks for this tutorial.

Only one thing, I have a "page not found error" when clicking on "page 2" link.

By: till

The tutorial has just one page. I've removed the link now.

By: Denny

Why no rspamd?

By: till

The tutorial was written before ISPConfig 3.1.15 was released. We will publish tutorials for Rspamd soon.

By: Abdul

ISPConfig 3.1.15 Install indeeds proposes rspamd configuration even if not installed, it seems to work (install + admin panel):

... [WARN] autodetect for Rspamd failed Force configure Rspamd (y,n) [n]: y Configuring Rspamd ...    

However, I've seen on https://www.howtoforge.com/replacing-amavisd-with-rspamd-in-ispconfig/ that redis is needed as well, so I tried also that approach, and it worked as well.

By: till

It does not propose Rspamd configuration, it does the exact opposite, it proposes to not configure Rspamd which is the right choice as it's not installed. So you should have chosen 'n' here as suggested by the installer as this setup uses amavisd and not rspamd. That the setup works nonetheless of choosing 'y' here is because it uses amavisd and Rspamd is not in use.

By: Nikolay

Hey @till,

What about rspamd ? I thought that the new tutorial will have info about rspamd migration/installation.

Thanks

By: Hodge555

I've tried the Perfect Server Buster build on 2 new servers and all seems well until I get to ISPConfig. I start that and it's OK until I get info messages that the relevant services are not detected:

[INFO] service Apache not detected[INFO] service nginx not detected[INFO] service Postgrey not detected[INFO] service Postfix not detected[ERROR] Postfix not installed - skipping Mail[INFO] service Jailkit not detected[INFO] service pureftpd not detected[INFO] service BIND not detected[INFO] service MyDNS not detected[INFO] service OpenVZ not detected[INFO] service Ubuntu Firewall not detected[INFO] service Bastille Firewall not detected[INFO] service Metronome XMPP Server not detected

but when I check the services it looks like they are there and on.

sudo service --status-all<snip> [ - ]  apache2 [ - ]  apache-htcacheclean [ + ]  apparmor [ + ]  avahi-daemon [ + ]  bind9<snip> [ + ]  dovecot [ + ]  fail2ban<snip> [ + ]  haveged<snip> [ + ]  mysql<snip> [ + ]  nginx [ + ]  nmbd [ + ]  ntp [ + ]  openbsd-inetd [ + ]  php7.3-fpm<snip> [ + ]  postfix [ + ]  postgrey<snip> [ + ]  pure-ftpd-mysql<snip>

Any ideas?

By: till

Either you are not logged in as root user when you start the ISPConfig installer or you used 'su' instead of 'su -' to become root, see first chapter of this guide or the PATH variable settings of your base system are completely messed up so that no binaries can be found by using the which command on your server. If you need further help, please post in the ISPConfig forum here at howtoforge.

By: hodge555

thanks for the prompt response.

By: jay

Thanks for this tut.

I've got some weird behaviour with the webmail settings though:When opening http://fqdn:8081/webmail, the adress changes itself into http://fqdn:8081/squirrelmail and then returns an error that states: "CONFIGURATION ERROR, config.inc.php was not found. Please read the INSTALL instructions!"Even though I installed Roundcube following your tutorial and the browser tab even says "Roundcube Webmail".File /etc/roundcube/config.inc.php exists and is readable...

Any idea what went wrong?

By: Slayer

I got the same error.

nginx log error:

 file_put_contents(/var/log/roundcube/errors): failed to open stream: Permission denied in /usr/share/roundcube/program/lib/Roundcube/rcube.php on line 1259PHP message: PHP Warning:  SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: NO) in /usr/share/roundcube/program/lib/Roundcube/rcube.php on line 1364PHP message: PHP Warning:  file_put_contents(/var/log/roundcube/errors): failed to open stream: Permissão negada in /usr/share/roundcube/program/lib/Roundcube/rcube.php on line 1259PHP message: PHP Warning:  config.inc.php was not found. in /usr/share/roundcube/program/lib/Roundcube/rcube.php on line 1364"

I checked in mariadb and database, user and pass created successfully.

 

By: Abdul

The /etc/roundcube folder has weird permissions. Reverting them to normal fixes the issue as seen in https://forum.vestacp.com/viewtopic.php?t=16995#p75838:   However, I did a more standard chmod: sudo find /etc/roundcube -type f -exec chmod 664 {} \; sudo find /etc/roundcube -type d -exec chmod 775 {} \; sudo find /etc/roundcube -type d -exec chmod g+s {} \;

By: OsmDroid

thanks so much for postfix-sasl changes in fail2ban. It really messes up mail.log with constant spam. Perfect server guides are best <3

By: enetmedia

There are 2 errors when installing ISPConfig:

 

PHP Warning:  symlink(): No such file or directory in /tmp/ispconfig3_install/install/lib/installer_base.lib.php on line 2395

Installing ISPConfig

 

AND

 

PHP Warning:  symlink(): No such file or directory in /tmp/ispconfig3_install/install/lib/installer_base.lib.php on line 2840

Configuring DBServer

Installing ISPConfig crontab

Installing ISPConfig crontab

no crontab for root

Detect IP addresses

Restarting services ...

Installation completed.

By: Markus Petzsch

I have a problem running perl scripts in the cgi-bin folder. In the error log I constantly get:

2019/10/08 15:24:01 [error] 12856#12856: *51 FastCGI sent in stderr: "Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?" while reading response header from upstream, client: 195.145.170.147, server: otrs.petzsch.eu, request: "GET /cgi-bin/hello_world.cgi HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "otrs.petzsch.eu"

I've definitly set the correct chmod and my vhost file is unmodified and CGI support enabled for the vHost.

Anyone a clue?

By: Tom Mueller

Hi Till,

there's a part where some permissions have to be set for roundcube.In the tutorial, the file ownerships are set to a user and/or group ispapps, but neither user nor group are created anywhere in the tutorial. What to do there?BestTom

By: till

Thank you for the notice, I fixed the issue now by moving them after the ISPConfig installation step. The commands need to run after you installed ISPConfig as ISPConfig creates the ispapps user and group.

By: Richard Lyons

You have a sed replacement near the end of chapter 8 (see below since this editor will not let me write both sides of the code quote) , but the string for replacement does not seem to exist in the file. Has this been superseded by changes?

sed -i -r 's/_dbc_nodb="yes" dbc_mysql_exec/_dbc_nodb="yes"; dbc_mysql_exec/g' /usr/share/dbconfig-common/internal/mysql

By: tkuser

Could you add how to configure htaccess for phpmyadmin?

By: skrb_x

This is the tutorial with Nginx, there is no htaccess thing here.. There is another tutorial with Apache, you should follow that one.

By: Nejat

If I try to open htts://myfqdn:8080 I allways get page load timeout after something about 3 minutes or so.The same if I try it with my servers ip adress. Do I have to set dns records maybe? If so which in detail? Best regards and thank you in advance

By: till

DNS is not needed. If your server is behind a nat router (at home or in office), then you might have to forward port 8080 from your router to your server. or you run a firewall on the server where port 80n is closed. If you need further help, please post your issue in the ispconfig support forum here at howtoforge.

By: Cesar

Hi, thanks for the tutorials.I would like to know if the tutorials of The Perfect Server Debian 10 Nginx and with Apache work on a PC with 1GB of RAM or should be 2GB, to know if it is possible to test on a Raspberry Pi or on a basic 1GB VPS. Thank you very much

By: Brit

First, I appreciate this very complete and useful tutorial.I have several doubts and that's why I would like to ask these four questions.1 - In chapter 8 in the section open the file /etc/postfix/master.cf, the line-o smtpd_client_restrictions = permit_sasl_authenticated, rejectthat does not exist in the file, what I did was add this line, but when I did it I did not receive emails and from gmail it showed the following:554 5.7.1 <mail-lf1-f46.google.com [209.85.167.46]>: Client host rejected: Access deniedThat's why I deleted the line, but my question is whether this affects security?2 - I do not know much about the subject, but MX, A, TXT and other data must be added in the control panel where the Domain is registered or in the VPS service or in the ISPConfig panel or in the 3 at the same weather?3 - These are the services that are working, the question is whether the signed services [-] are completely turned off or only work when they should do so to save resources?# service --status-all [+] amavis [-] amavisd-snmp-subagent [-] amavis-mc [+] apparmor [+] bind9 [+] clamav-daemon [+] clamav-freshclam [+] cloud-config [+] cloud-final [+] cloud-init [+] cloud-init-local [+] cron [+] dbus [+] dovecot [+] fail2ban [-] fcgiwrap [+] haveged [-] hwclock.sh [+] kmod [+] memcached [+] mysql [+] networking [+] nginx [+] ntp [+] openbsd-inetd [+] php7.3-fpm [+] postfix [+] postgrey [+] procps [+] pure-ftpd-mysql [-] quota [-] quotarpc [-] rsync [+] rsyslog [-] screen-cleanup [-] spamassassin [+] ssh [-] sudo [+] udev [+] ufw [+] unscd

4- It will be a PC only for a personal mail, which ports is recommended to leave open with ufw?Thank you very much

By: milly

How can I add a new domain? (domini2) Try adding the new domain in ISPConfig from Mail / Add domain /:Server: mail.domain1.comDomain: domain2.comThe new email from domain2 works fine, even receiving and sending is almost immediate.But maybe it is so fast is because something is not going well, I would like to know if I should add domain2 in some server configuration from the console, I think that something does not work well, I do not know if I have to do something different or if I have to configure DNS records differently because https://mecsa.jrc.ec.europa.eu/ shows this big differenceIn Phishing and identity theft:[email protected] 5 [email protected] 0 starts

https://i.ibb.co/NxGjzmP/domain.png

Thank you very much for the help

By: till

Please use the ISPConfig forum here at howtoforge for support requests.

By: BlueEagle

While Nginx doesn't have global aliases you can still set up wildcard prefix sites for roundcube and phpmyadmin.

Create /etc/nginx/sites-available/roundcube.vhost

[code]

server {        listen 80;        root /var/lib/roundcube;        # Add index.php to the list if you are using PHP        index index.php;        server_name mail.*;        index index.php;        location / {            try_files $uri $uri/ =404;        }        location ~ [^/]\.php(/|$) {                fastcgi_split_path_info  ^(.+\.php)(/.+)$;                fastcgi_index            index.php;                fastcgi_pass             unix:/var/run/php/php7.2-fpm.sock;                include                  fastcgi_params;                fastcgi_param   PATH_INFO       $fastcgi_path_info;                fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;        }}[/code]

And symlink this to sites-enabled

[code]

ln -s /etc/nginx/sites-available/roundcube.vhost /etc/nginx/sites-enabled/000-roundcube.vhost

[/code]

You can now open mail.example.com or mail.subdomain.example.com or mail.subdomain2.example.com

This also works for phpmyadmin by changing root=/usr/share/phpmyadmin; and server_name phpmyadmin.*;

By: Jawad

Hi

Please, I can recieve email from extern (from gmail for example).

this is my mail log:

[Log Removed]

By: till

Please post your support request in the ISPConfig support forum here at howtoforge. https://www.howtoforge.com/community/forums/installation-configuration.27/

By: fbifido

Can you use a this server to deploy or give users access to VPS?

Can i offer my users VPS server using this Perfect Server?

if not what setup can i use to offer this services to ~100 developers using my own used-servers (dell poweredge R620 16C/64gRam/4x1TBSSD)?

 

 

By: fbifido

1. Can you use a this server to deploy or give users access to VPS?

2. Can i offer my users VPS server using this Perfect Server?

3. if not what setup can i use to offer this services to ~100 developers using my own used-servers (dell poweredge R620 16C/64gRam/4x1TBSSD)?

4. Can you do a writeup of the opensource part of https://www.virtuozzo.com/products/virtuozzo-infrastructure-platform.html?

5. Can you add the opensource part of this to your Perfect Server: http://www.virtualizor.com/docs/install/ ?

 

Please & Thanks. 

 

By: Kevin S

phpMyaAmin is not accessible at domain.com:8080/phpMyAdmin and domain.com:8080/phpmyadmin as it throws 404 not found error. ISPConfig is accessible via domain.com:8080

By: till

You are using the wrong port, the port for phpmyadmin is 8081 on Nginx systems.

By: PermaNoob

Installing this Monday or Tuesday.

I won't be using phpMyAdmin so won't be installing it. (I use adminer) Will there be any problem if I don't install/use phpMyAdmin? I also won't be installing PureFTPd (I use winscp with shell user, so don't see a need, unless I'm missing something?) Quota, Bind, RoundCube.

Are there any dependencies/problems with not having any of those?

By: PermaNoob

at the end of section [email protected]:~# netstat -tap | grep mysqltcp6       0      0 [::]:mysql              [::]:*                  LISTEN      4027/mysqldMine [email protected]:~# netstat -tap | grep mysqltcp6       0      0 [::]:mysql              [::]:*                  LISTEN      17834/mysqldIs 17834 a problem?

By: Ozolnieks

php session garbage collector not working. I have to run cron for every user seesion_gc(); to clean expired sessions.  

By: till

This has been fixed in ISPConfig and is not related to the above tutorial, so no need for a separate cronjob. Just run ispconfig_update.sh command and choose git-stable as update source.

By: Ozolnieks

I got "There are no updates available for ISPConfig 3.1.15p3" when run ispconfig_update.sh

By: till

Choose git-stable, as I mentioned above, not stable.

By: Ozolnieks

Thanks a lot, works.

By: Antonio

Hello, and thank you for your tutorial. I'm trying to build a Debian 10 nginx vmware vm to move my websites onto it. My problem is (and it is driving me crazy) that this vm freezes when I'm using wordpress website I installed, or when I use ispconfig. And logs are not telling me anything cause the freezing. For your experience, do you have an idea about what I could check to understand this freezes ? Thank you

By: fbifido

Till Brehm

Can you do a setup, so that i can be a VPS provider. like linode.

Please & Thanlks.

By: Jeferson Oliveira

ISPConfig

http(s)://192.168.1.100:8080/ ( http or https depends on what you chose during installation). Log in with the username admin and the password admin (you should change the default password after your first login):

It should be http(s)://192.168.0.100:8080/ instead.

Thank you so much for this guide.

By: viky

excuse me

where is the download link?

By: till

The download link is in the page menu on the right side, right below the big red download icon.

By: kameleon1er

Thanks for the tuto, but got problem with steps :

sed -i - r… nothing in output

netstat - tap… nothing in shell output

and step, install phpmyadmin, problem with maria db errors : 

systemctl start mysqld

Warning: The unit file, source configuration file or drop-ins of mysqld.service changed on disk. Run 'systemctl daemon-reload' to reload units.

I'm on fresh VPS / Debian Buster

By: Perica Supernowa

Hallo Till! Wollte dir einen Vorschlag bezüglich der Organisation der Anleitungen machen. Angenommen ich benutze diese Anleitung... Bei beginn der Installation (von ISPConfig) nach dieser Anleitung wird ja die letzte stable Version von ISPConfig heruntergeladen. Das wäre in diesem Fall die 3.2...

Diese Anleitung ist aber für die ISPConfig 3.1.(x.x) Version. Es wäre sicher von Vorteil wenn du auf deinem (Download)Server die stable ISPConfig 3.1 und 3.2 aufbewahrst.

Wenn du nächstes mal die vollständige Anleitung für den perfekten Server (z.B. ISPConfig 3.2, Debian, nginx...) schreibst und es kommt zum nächsten Minor-Update solltest du das im Hinterkopf behalten und nicht vergessen diesen "organisatorischen Denkfehler" zu machen.

Bisher hast du sehr gute Arbeit geleistet... Ich bin dir sehr dankbar dafür...

 

Grüße

Perica

By: Perica

Is there a problem when i'm installing certbot from the debian repository...?!

By: Perica

And what is with the buster-update repository ala volatile???

By: Myst

Thank you very much for the work done!

By: Hodge555

Thanks for the tutorial, I've just completed the build and it's fine.I have set up a client, a domain and an email via ISPConfig and I can login to it.Even though my domain info is real I don't need my own email server on the internet hence in my case the server is just really for home use. Thus I have an outbound relay setup with my domain host and this is working fine so I can send emails out from my new virtual user mailbox.My problem is with inbound email.At this point I route all my emails/domains to my ISP email and then collect them from there using getmail, all currently into 1 mailbox.My old email server used a real unix account so the following getmail config worked fine under that account.[retriever]type = SimpleIMAPSSLRetrieverserver = imap.x.x.xport = 993username = xxxxxpassword = yyyyy[destination]type = Maildirpath = /home/zzz/Maildir/user = zzz[options]...For this new build I've copied the retriever section and am trying to get the destination part to work but so far I keep getting authentication errors.i.e. How do I authenticate that virtual email account for my destination?I'm trying variations on the following so if someone can point me in the right direction that would be great.[destination]type = MDA_externalpath = /usr/lib/dovecot/deliverthen combinations of the following:arguments = ("-e", )user = vmailgroup = vmailarguments = ("-e", "--recipient=%([email protected])")user = [email protected] = zzzzzOr should I just give that up and permission a user unix account to the virtual user email path (/var/vmail/homedomain/myvirtualmail/Maildir) and then go back to using the following?:[destination]type = Maildirpath = /var/vmail/homedomain/myvirtualmail/Maildiruser = zzzThanks in advance Hodge

By: Hope

Hello, I made this tutorial and it works great.  But I need php 8.  how can i upgrade php 8

By: till

You can install additional PHP versions, do not replace the main PHP version as this will break the setup. Please see here: https://www.howtoforge.com/tutorial/how-to-install-php-7-for-ispconfig-3-from-debian-packages-on-debian-8-and-9/

By: Ralph

Hy,

does someone know when there will be a setup guide like this for debian 11 ?

 

regards, Ralph

By: till

The ISPConfig installation guide for Debian 11 can be found here: https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/

By: Marcos

Very useful tutorial! I got this error after editing the fstab with the options:mount: /etc/fstab: parse error at line 1 -- ignoredA fter command : quotacheck -avugm quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option. Thanks!

By: bobik

phpmyadmin shows an error:

 The $cfg['TempDir'] (/var/lib/phpmyadmin/tmp) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

someone knows what the problem is