Gernot Walzl


Apache is free and open-source web server.
It powers most web sites on the internet.


The official Debian repository contains Apache and PHP:

apt install apache2 php libapache2-mod-php


When you own a domain (e.g., you can specify the zone of that domain.
For a web server, the following entries are relevant:

@    IN  A       ; IPv4 address for
@    IN  AAAA   2001:db8:10::1  ; IPv6 address for
www  IN  CNAME  @               ; is an alias for
@    IN  CAA    0 issue ""


The Certification Authority Authorization (CAA) defines the Certificate Authority (CA)
that is allowed to issue certificates for the domain.

Web Site

A web server can serve many web sites.
Each web site is configured as virtual host on the server:

<VirtualHost *:80>
    DocumentRoot /var/www/
    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log vhost_combined

When the configuration file of the site is available, the site needs to be enabled:


SSL/TLS Certificate

Install certbot to get a SSL/TLS certificate from Let's Encrypt:

apt install certbot python3-certbot-apache

Create and install the certificate (add all subdomains you might need):

certbot --apache -d -d -d


Most sites written in PHP (e.g. WordPress, phpMyAdmin, Matomo, ...)
require the following modules, which are part of php-defaults, to be installed:

apt install php-curl php-gd php-intl php-mbstring php-mysql php-xml php-zip

Additional modules provide better image quality for media uploads:

apt install php-imagick

External Links

CONTENT.html source 2022-05-22 3.2 KB