mauriziofonte / win11-wsl2-ubuntu22-setup

Setup a LAMP Stack on Windows 11 (and on Windows 10 >=1903.18362), with WSL2, Ubuntu 24.04 and native systemd Services. This repository comes with an easy automated installer that will cover everything for you.
MIT License
17 stars 4 forks source link

Apache start fails using manual and automated install #1

Open JayEn84 opened 7 months ago

JayEn84 commented 7 months ago

Hey Maurizio,

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?

Thanks for your script anyways! Greetings

JayEn84 commented 7 months ago

A closer look at the manual installation and executing the commands one by one, I already receive an error directly after the apache installation:

Command:

PHPVERS="8.3 8.2 8.1 8.0 7.4 7.3 7.2 7.1 7.0 5.6"
PHPMODS="cli bcmath bz2 curl fpm gd gmp igbinary imagick imap intl mbstring mcrypt memcached msgpack mysql readline redis soap sqlite3 xsl zip"
APTPACKS=$(for VER in $PHPVERS; do echo -n "libapache2-mod-php$VER php$VER "; for MOD in $PHPMODS; do if [ "$VER" = "8.3" -a "$MOD" = "mcrypt" ]; then continue; fi; echo -n "php$VER-$MOD "; done; done)
apt install -y apache2 brotli openssl libapache2-mod-fcgid $APTPACKS

Result (excerpt):

Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.
invoke-rc.d: initscript apache2, action "start" failed.
× apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2024-03-09 13:36:25 CET; 3ms ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 174568 ExecStart=/usr/sbin/apachectl start (code=exited, status=139)