So people complained about how PHP Scripts using DOCUMENT_ROOT break when Apache is being run with VirtualDocumentRoot and mod_vhost_alias since DOCUMENT_ROOT doesn’t get set properly. Apache evidentally fixed this sometime ago and the brief notes are here:
http://svn.apache.org/viewvc?view=revision&revision=1132494
Sadly, there isn’t enough detail explaining how to actually override the DocumentRoot on a per-request basis. I’m guessing it must be done with mod_rewrite somehow but I’m not certain. Does anyone know how to do this?
Well, evidentally, I wasn’t quite asking the right question. Here’s some information I got directly from Stephan on the Apache2 Bugzilla list:
Stephan said:
And I pushed back to clarify:
And he replied:
So I ran apache2 -v and discovered I’m not running 2.4.x. Apache2 -v shows this:
And if you notice the Server was built at the end of November this year when I used aptitude -install apache2. I don’t know if apt-get would have pulled apache 2.4 instead. This is very lame. 2.4.3 stable was released in August. I don’t know why aptitude pulled 2.2 but this really created a nightmare for me.
So in reality, the question I asked was moot. Everything should have worked fine, except that aptitude installed an outdated apache2 and I didn’t realize what was going on. There is no bug anymore.