Pay attention to SetEnv directives in Apache config

They don't modify the OS environment, they modify the WSGI environment.