ports 80 and 443 suddenly closed on macos server
Turned out that the /Library/Server/Web/Config/Proxy/apache_serviceproxy_customsites.conf file became corrupted.

Luckily, there was a backup file in the same directory /Library/Server/Web/Config/Proxy/apache_serviceproxy_customsites.conf.previous and simple swap solved the problem! (remember to restart the Websites service)

Not sure if this is relevant but it might:
From Etrecheck report I’ve noticed that there was an MacOS update about the time when the problem occurred:
2019-02-19 Security Update 2019-001 (10.13.6)



Apple Support Communities thread that helped to track-down the issue: https://discussions.apple.com/thread/250188369



EDIT

The problem came back today (after 10 days).

The trick described above didn't work.

(It might have had something to do with renewing the SSL certificate this time.)



EDIT 2

This time I’ve managed to repair Website service (and open ports 80 and 443) by commenting the last line of the following config file: /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf

#IncludeOptional /Library/Server/Web/Config/Proxy/apache_serviceproxy_customsites*.conf`


Not sure how long that'll last this time ;-)

EDIT 3

Still don't have a clue what was happening. Recently needed to re-enable the cutomsites in order to park couple of new domains. Server still works fine... so far.