I'd like to run my website in two different modes: dev, and test. I currently have the site set up in /var/www/mywebsite.com and working fine. Now I'd like to set up a different url that points to the same files, but has only one difference: apache's setEnv. I want to setEnv APP_ENV test so I can then hit http://test.mywebsite.com/ and read that APP_ENV in PHP. Is this possible?
The Apache docs say that virtualhost is a valid context, and that declaring it with no value sets it to empty. Just do this (haven't tested, GL :-)
<VirtualHost dev.mysite.xyz:80> ... SetEnv ... </VirtualHost> <VirtualHost test.mysite.xyz:80> ... SetEnv APP_ENV ... </VirtualHost>