SetEnv fails with Apache 2.4

By | March 28, 2019
Spread the love

If Apache error logs show below error message

Invalid command ‘SetEnv’, perhaps misspelled or defined by a module not included in the server configuration

The control of internal environment variables that are used by various Apache HTTP Server modules are controlled by the module mod_env.

By default module ‘mod_env’ will not be enabled in apache2.4. This will cause below error while using ‘SetEnv’ in .htacess file.

To resolve this problem, we need to install the module ‘mod_env’ manually.

For easyapache4 users,

#yum install ea-apache24-mod_env.x86_64

Leave a Reply

Your email address will not be published. Required fields are marked *

eighteen + 14 =