Environmental variables for Apache
Forcing debug mode
You can force a site to use Outlast Framework’s debug_mode (in which errors and log messages are displayed, template files are automatically regenerated, etc.) from the httpd.conf
Apache configuration file or the .htaccess
file. Simply add the following line to your vserver or the .htaccess file:
SetEnv OFW_DEBUG_MODE "true"
Setting the locale
You can set the locale using the OFW_LOCALE
environmental variable.
SetEnv OFW_LOCALE "en_US"
Setting the baseurl
You can set the baseurl using the OFW_BASEURL
environmental variable.
SetEnv OFW_BASEURL "http://example.com/"
Forcing external login verification
You can also set up additional cookie-based protection for Outlast Framework sites. If you add the following to your Apache conf, Outlast Framework will not allow any requests to pass without the proper cookie present.
# Force verification SetEnv MOZAJIK_LOGIN_AUTH "aUNIqUEcodeTHAThasTObePRESENTinAcookieFORmozajikREQUESTS" SetEnv MOZAJIK_LOGIN_URL "http://example.com/login_for_all_users/"
So in the example above, if $_REQUEST[‘DEBUG_LOGIN_AUTH’] does not equal exactly what is set as the code above, Outlast Framework will redirect all requests to DEBUG_LOGIN_URL. At the login url you can set up some sort of external verification method where you set the secret cookie, thus allowing requests to go through.
Keep in mind this is not meant to replace a real authentication system – instead it is a quick and easy way to secure and password protect staging sites or other non-confidential systems on a multi-site basis when htaccess password protection will not do.
You can use MOZAJIK_LOGIN_WHITELIST
to provide a comma-separated list of whitelisted IP addresses.