Upgrading WordPress to PHP 7 and broken permalinks

I recently upgraded this server from PHP 5 and Debian 7 “Wheezy”  to PHP 7 and Debian 9″Stretch”, and everything seemed fine.  Except that all my permalinks stopped working.  I’m running Apache (2) as my web server, and it had been working fine with PHP 5, so at first I assumed it was something with PHP 7.  There were some places where my config files needed to be updated for PHP 7, but that wasn’t the problem.

Turns out that in apache2.conf there was a configuration that read:

<Directory /home/www>
 Options Indexes FollowSymLinks
 AllowOverride None
 Require all granted
</Directory>

That needed to be changed to:

<Directory /home/www>
 Options Indexes FollowSymLinks
 AllowOverride All
 Require all granted
</Directory>

And after restarting apache2, it all worked (bolding just to show the change).