Almost the same exact question as another here, but none of the answers helped me..
I upgraded ubuntu 18.04 to 20.04.
Running systemctl restart apache2 gives me,
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-10-07 19:54:59 EDT; 28s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 63572 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Oct 07 19:54:59 glenn-VirtualBox systemd[1]: Starting The Apache HTTP Server...
Oct 07 19:54:59 glenn-VirtualBox apachectl[63586]: AH00526: Syntax error on line 128 of /etc/apache2/apache2.conf:
Oct 07 19:54:59 glenn-VirtualBox apachectl[63586]: CoreDumpDirectory /tmp/mycoredump does not exist
Oct 07 19:54:59 glenn-VirtualBox apachectl[63572]: Action 'start' failed.
Oct 07 19:54:59 glenn-VirtualBox apachectl[63572]: The Apache error log may have more information.
Oct 07 19:54:59 glenn-VirtualBox systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Oct 07 19:54:59 glenn-VirtualBox systemd[1]: apache2.service: Failed with result 'exit-code'.
Oct 07 19:54:59 glenn-VirtualBox systemd[1]: Failed to start The Apache HTTP Server.
The syntax error on line 128 is because I put the following in apache2.conf,
CoreDumpDirectory /tmp/mycoredump
On line 128. I also followed these steps,
Set up the directive as follow
CoreDumpDirectory /tmp/mycoredump
Create the directory:
mkdir -p /tmp/mycoredump
Assign ownership to the directory www-data or httpd
chown -R www-data:www-data /tmp/mycoredump
Set permissions to:
chmod 777 /tmp/mycoredump
Restart Apache:
service apache2 restart
But this is also not working. The dir mycoredump is owned by www-data and set to 777....
So, Im guessing it has something to do with PrivateTmp=true (Found in other threads) BUT
im stretched too thin to pull on these threads. ;-(
The results of sudo a2query -m
php8.0 (enabled by site administrator)
access_compat (enabled by maintainer script)
dir (enabled by maintainer script)
authz_core (enabled by maintainer script)
deflate (enabled by maintainer script)
authn_file (enabled by maintainer script)
negotiation (enabled by maintainer script)
ssl (enabled by site administrator)
mpm_prefork (enabled by maintainer script)
auth_basic (enabled by maintainer script)
authz_host (enabled by maintainer script)
authz_user (enabled by maintainer script)
filter (enabled by maintainer script)
dnssd (enabled by maintainer script)
headers (enabled by site administrator)
autoindex (enabled by maintainer script)
setenvif (enabled by maintainer script)
mime (enabled by maintainer script)
reqtimeout (enabled by maintainer script)
socache_shmcb (enabled by site administrator)
env (enabled by maintainer script)
alias (enabled by maintainer script)
rewrite (enabled by site administrator)
authn_core (enabled by maintainer script)
status (enabled by maintainer script)
and I have run,
sudo a2dismod php*
sudo a2enmod php8.0
Running sudo apache2ctl configtest gives me,
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
Syntax OK
Any and all help, greatly appreciated !