Symptoms and solution
In many Q&A web sites or forums, people confuse symptoms and actual causes. I just upgraded a ubuntu server from 13.10 to 14.04.1 and ran into the exact same symptoms described by the OP, including:
1- apache apparently not working.
2- apache configuration variable undefined.
3- the syntax error mentioned by the OP.
The problem is that not all of these symptoms are actually germane to the actual problem and they only serve as a distraction to those who try their best to help.
Different root problems may cause administrators to come to sites like this one with roughly the same description: "I upgraded the OS and now apache is not working..."
One specific cause
Having all the exact same apparent symptoms as the OP, I was attracted to this question. Unfortunately, the only answer that contained a valid hint to the real root cause of my problem was downvoted (-1), posted by user1469291 with a rep of 1!!
So I searched further other web sites until I found a clear explanation of the problem (and thereby of the solution).
The solution that follows may not solve the OP's real problem, but I'm sure that it'll help others who may be attracted to this question for the same reasons as I was.
# Include generic snippets of statements
# Include the virtual host configurations:
which means that only site configuration files in /etc/apache2/sites-enabled/ ending in .conf will get loaded. Older symlink in that directory will be ignored.
It used to be simply sites-enabled/*. That's why all my virtual host configuration files that I simply named ww1.example.com, ww2.example.com, etc, used to work but suddenly and initially inexplicably stopped working after the upgrade.
So, either change the directive above and reload apache, or, like I did, manually remove all the older symlinks in sites-enabled/, rename all the files in sites-available/ to add the suffix .conf and then re-enabled each site individually.
In addition, the default directive in apache.conf are stricter:
Require all deny
Options Indexes FollowSymLinks
Require all granted
So if you host your virtual sites in /home/user/somewhere, make sure to override the directive appropriately.