morefx

Registered
Jun 14, 2013
4
0
1
cPanel Access Level
Root Administrator
Hi,

after upgraded apache from 2.2. to 2.4. Although I use pretty much the same configuration, I get "Invalid command 'SetEnv'" with 2.4.

/home/foobar/public_html/.htaccess: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration


I double checked to have mod_env and mod_redirect checked in EasyApache. However the module is not present in apache 2.4 (see below). I noticed that "env" is not enabled by default in 2.4 any more, but is should work if enabled manually, I suppose.

Can anyone shed some light on this issue?

Regards
Chris

Working:
Code:
Server version: Apache/2.2.26 (Unix)
Server built:   Nov 30 2013 23:12:43
Cpanel::Easy::Apache v3.22.24 rev9999 +cloudlinux
Loaded Modules:
 core_module (static)
 authn_file_module (static)
 authz_host_module (static)
 authz_groupfile_module (static)
 authz_user_module (static)
 authz_default_module (static)
 auth_basic_module (static)
 include_module (static)
 filter_module (static)
 deflate_module (static)
 log_config_module (static)
 logio_module (static)
 env_module (static)
 expires_module (static)
 headers_module (static)
 unique_id_module (static)
 setenvif_module (static)
 version_module (static)
 proxy_module (static)
 proxy_connect_module (static)
 proxy_ftp_module (static)
 proxy_http_module (static)
 proxy_scgi_module (static)
 proxy_ajp_module (static)
 proxy_balancer_module (static)
 ssl_module (static)
 mpm_prefork_module (static)
 http_module (static)
 mime_module (static)
 status_module (static)
 autoindex_module (static)
 asis_module (static)
 info_module (static)
 suexec_module (static)
 cgi_module (static)
 negotiation_module (static)
 dir_module (static)
 actions_module (static)
 userdir_module (static)
 alias_module (static)
 rewrite_module (static)
 so_module (static)
 hostinglimits_module (shared)
 bwlimited_module (shared)
 suphp_module (shared)
 security2_module (shared)
Syntax OK
Broken:
Code:
Server version: Apache/2.4.7 (Unix)
Server built:   Nov 30 2013 23:05:11
Cpanel::Easy::Apache v3.22.24 rev9999 +cloudlinux
Loaded Modules:
 core_module (static)
 authn_file_module (static)
 authn_core_module (static)
 authz_host_module (static)
 authz_groupfile_module (static)
 authz_user_module (static)
 authz_core_module (static)
 access_compat_module (static)
 auth_basic_module (static)
 socache_shmcb_module (static)
 socache_dbm_module (static)
 so_module (static)
 include_module (static)
 filter_module (static)
 deflate_module (static)
 http_module (static)
 mime_module (static)
 log_config_module (static)
 logio_module (static)
 expires_module (static)
 headers_module (static)
 unique_id_module (static)
 setenvif_module (static)
 proxy_module (static)
 proxy_connect_module (static)
 proxy_http_module (static)
 slotmem_shm_module (static)
 ssl_module (static)
 mpm_prefork_module (static)
 unixd_module (static)
 status_module (static)
 autoindex_module (static)
 info_module (static)
 suexec_module (static)
 cgi_module (static)
 negotiation_module (static)
 dir_module (static)
 actions_module (static)
 userdir_module (static)
 alias_module (static)
 rewrite_module (static)
 hostinglimits_module (shared)
 bwlimited_module (shared)
 suphp_module (shared)
 security2_module (shared)
Additional info:
WHM 11.40
CloudLinux
EasyApache 3.22.24
PHP 2.3.27 with SuExec
 

morefx

Registered
Jun 14, 2013
4
0
1
cPanel Access Level
Root Administrator
Hi!

I played with the options in EasyApache a bit and this is what I found:

1. Activate "Env" for Apache 2.4.7 (Upgrading from 2.2)
-> env_module not present.
2. Rerun EasyApache: note that "Env" is magically unchecked.
-> env_module not present.
3. Rund EasyApache a third time, again enable "Env".
-> env_module present!

A wild guess: Env was a default option (marked orange) in Apache 2.2 but not in 2.4. In the UI "Env" might be marked as active erroneously in 2.4 for the first run, but processed as unchecked.

Can anyone reproduce this?

Cheers
Chris
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Could you open a support ticket so we can take a closer look and attempt to reproduce this issue?

Submit A Ticket

You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
When I save a profile, the env variable is not included in the file.
I need reselect by hand on each recompile...
I could not reproduce this issue. Could you open a support ticket so we can take a closer look and reproduce the issue on your system?

Thank you.
 

PenguinInternet

Well-Known Member
PartnerNOC
Jun 20, 2007
195
26
78
Cardiff, UK
cPanel Access Level
DataCenter Provider
Twitter
I can confirm that this is still an issue - we just upgraded a number of web servers to 2.4 and Env was specifically ticked during the upgrade but was not enabled and required Easyapache to be run again, selecting it again.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Could you let us know the ticket number of the support ticket you submitted for this issue so we can update this thread with the outcome?

Thank you.