A recent update made my server on my lan inaccessible on port 80. I was able to ssh into it on 22, and nmap revealed that it was listening on 22, 443, 3306 and 10000. However, NOT 80. A great deal of cat on various .conf files failed to turn up an answer.
Finally after many hours, the first reply in this post: by Florian Diesch revealed the first step in ferreting out the problem.
His suggestion to place another server on that machine like this: sudo python -m SimpleHTTPServer 80, revealed that there was not really a problem with apache2, just that one of the conf files was broken.
Before having port 80 available at all, I could not get systemctl status apache2.service to work at all, however after getting some listening going on for port 80 with the python snippet above, I got this result:
systemctl status apache2.service ● apache2.service - LSB: Apache2 web server Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d └─apache2-systemd.conf Active: failed (Result: exit-code) since Tue 2017-06-13 20:40:43 EDT; 39s ago Docs: man:systemd-sysv-generator(8) Process: 4411 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE) Jun 13 20:40:43 s2 apache2: * The apache2 configtest failed. Jun 13 20:40:43 s2 apache2: Output of config test was: Jun 13 20:40:43 s2 apache2: AH00526: Syntax error on line 5 of /etc/apache2/conf-enabled/phpmyadmin.conf: Jun 13 20:40:43 s2 apache2: order not allowed here Jun 13 20:40:43 s2 apache2: Action 'configtest' failed. Jun 13 20:40:43 s2 apache2: The Apache error log may have more information. .......
Several more lines followed, but the salient point was phpmyadmin.conf and "order not allowed here".
I edited phpmyadmin.conf and found this:
Alias /phpmyadmin /usr/share/phpmyadmin Order Deny, Allow Deny from all Allow from 127.0.0.1 Allow from 192.1.0 Allow from 192.1.1 <Directory /usr/share/phpmyadmin> various configs ..... </Directory>
I proceeded to comment out with # the line with "Order", save the conf file and then test again. Each time the error would show again with the offending line number incremented by one. When I had every one of those five lines before the first configuration block commented out, everything worked again. Neither my son nor I could figure out how the error appeared because neither of us had edited the file.
However, I finally remember that earlier that day, I had ssh'd into the server and did an update/upgrade cycle. That is the only possible source of these five lines getting into the phpmyadmin.conf file.
I must admit I was totally stumped by finding out that was the source of the problem. It was actually killing the apache2 service completely for port 80. I finally realize the apache2.conf file itself was including the other files as it loaded, thereby introducing the problem conf file.
12 hours of troubleshooting, but finally got it working after following many many rabbits down various holes from a LOT of searches.
Hope someone else may benefit from these revelations.