The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SetEnv fails with Apache 2.4

Discussion in 'EasyApache' started by morefx, Nov 30, 2013.

  1. morefx

    morefx Registered

    Joined:
    Jun 14, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    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
     
  2. morefx

    morefx Registered

    Joined:
    Jun 14, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    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
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,743
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  4. jmginer

    jmginer Well-Known Member

    Joined:
    Jul 26, 2006
    Messages:
    91
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Benifato, Spain
    When I save a profile, the env variable is not included in the file.
    I need reselect by hand on each recompile...
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,743
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  6. gohighvoltage

    gohighvoltage Member

    Joined:
    Jan 8, 2012
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    I have had this same exact issue. I had to rebuild easy apache and manually select env module.
     
  7. PenguinInternet

    PenguinInternet Well-Known Member
    PartnerNOC

    Joined:
    Jun 20, 2007
    Messages:
    149
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    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.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,743
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page