help.txt (136.0 KB)
What I did before::
I plugged in a harddisk to my Raspi - mounted it via Dietpi Drivemanager to /mnt/AV-Platte (=NTFS) and a second partition to /mnt/www (=EXT4)
Then I installed Apache, PHP and libapache2-mod-php.
Beginning with enabling PHP within Apache my problems began.
And my requirements are very simple. I would like to have a webserver with document root not on the SD-Card and with activated PHP.
By now I have the feeling that my system is deeply insulted due to federal Lighttpd, Apache and PHP installations. And I am not sure how to come out of this problems.
any ideas and many thanks in advance
I think PHP is enabled ootb.
What problems do you encounter now?
dietpi@DietPi-HU-Medienserver:~$ sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2023-01-25 10:30:51 CET; 1h 35min ago
Process: 4026 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Jän 25 10:30:51 DietPi-HU-Medienserver systemd: Starting The Apache HTTP Server...
Jän 25 10:30:51 DietPi-HU-Medienserver apachectl: AH00526: Syntax error on line 18 of /etc/apache2/conf-enabled/dietpi.conf:
Jän 25 10:30:51 DietPi-HU-Medienserver apachectl: Invalid command 'ThreadsPerChild', perhaps misspelled or defined by a module not included in the server configuration
Jän 25 10:30:51 DietPi-HU-Medienserver apachectl: Action 'start' failed.
Jän 25 10:30:51 DietPi-HU-Medienserver apachectl: The Apache error log may have more information.
Jän 25 10:30:51 DietPi-HU-Medienserver systemd: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jän 25 10:30:51 DietPi-HU-Medienserver systemd: apache2.service: Failed with result 'exit-code'.
Jän 25 10:30:51 DietPi-HU-Medienserver systemd: Failed to start The Apache HTTP Server.
I managed to solve the problem. There was an old dietpi.conf in the conf-enable dir which did not match with my current conf in sites-available.
Not im am happy: Apache ist running, PHP is working and the SD Card is not Document-Root any longer