Setup a LAMP Stack on Windows 11 (and on Windows 10 >=1903.18362), with WSL2, Ubuntu 22.04 and native systemd Services. This repository comes with an easy automated installer that will cover everything for you.
testing your script, looks very charming. I tried the automated and the manual install. Unfortunately, after both tries, apache2 was not running on my machine. apache2 --version
gives me the following error: [core:warn] [pid 1192] AH00111: Config variable ${APACHE_RUN_DIR} is not defined apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
Looking at your script, you do not edit apache2.conf at all. Do you have an idea what's going on?