Is SetEnv Supported by LiteSpeed?
The SetEnv directive is not supported by LiteSpeed Web Server. However, you can set environment variables using a RewriteRule in your .htaccess file as an alternative.
Workaround Using RewriteRule
Section titled “Workaround Using RewriteRule”Add the following line to your .htaccess file to set an environment variable:
RewriteRule .* - [E=myenv:myvalue]Replace myenv with the name of your environment variable and myvalue with the desired value.
Example: Setting Multiple Variables
Section titled “Example: Setting Multiple Variables”RewriteEngine OnRewriteRule .* - [E=DB_HOST:localhost]RewriteRule .* - [E=APP_ENV:production]