Apache/PHP Basisinstallation¶
Wir installieren die PHP- und Apache-Grundumgebung
PHP 7 (CLI)
Apache2 Webserver Basis
Wir beginnen mit …
PHP
Hier: PHP Version 7.4 aus Debian 11 Quellen
apt update
apt install php7.4-cli
# bei Erstinstall: 7.4.21
php --version
Webserver Apache
Hauptkonfiguration: /etc/apache2/apache2.conf
apt install apache2
# Serverstartmessage AH00558: could not reliably ...
# /etc/apache2/apache2.conf with: ServerName vm-bullseye
# Serverrelated commands:
apachectl configtest
systemctl restart apache2.service
Hier mal ein paar Meldungszeilen nach dem Install von apache2-Paket:
.....
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Trigger für man-db (2.9.4-2) werden verarbeitet ...
Trigger für libc-bin (2.31-13) werden verarbeitet ...
root@vm-lpic-server:~# apachectl configtest
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
root@vm-lpic-server:~# cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf-bak
root@vm-lpic-server:~# vim /etc/apache2/apache2.conf
root@vm-lpic-server:~# apachectl configtest
Syntax OK
Die Grundinstallation des Apache ist jetzt vorhanden und kann von einem Client (Browser) getestet werden:

Apache läuft¶