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.

EasyApache modifies .htaccess files?

Discussion in 'EasyApache' started by jack01, Nov 9, 2013.

  1. jack01

    jack01 Well-Known Member

    Joined:
    Jul 21, 2004
    Messages:
    200
    Likes Received:
    0
    Trophy Points:
    16
    Each time we recompile apache/php with EasyApache at least one of the our clients' .htaccess is modified by commenting out the following:

    AddHandler application/x-httpd-php5 .php .html .htm

    Any idea how to stop this happening?
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    In WHM-> Server Configuration -> Tweak Settings -> System
    set
    Depth to recurse for .htaccess checks = 0
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    This was likely the result of the update_php_mime_types script. You can run the following command if you want to ensure EasyApache skips this task:

    Code:
    touch /var/cpanel/easy_skip_update_php_mime_types
    However, note that it's important to open a bug report if this is happening in cases where it should not:

    Submit A Bug Report

    Thank you.
     
  4. Maknet Corp

    Maknet Corp Member

    Joined:
    Jul 14, 2015
    Messages:
    24
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator
    I'm sorry, I'm having the same issue and I don't totally understand what the fix is.

    If I touch that file, EasyApache will magically ignore commenting out the .htaccess file always?


    Incidentally, I'm glad someone pointed me in the direction of the tweak .htaccess-depth, because otherwise, I didn't understand why my .htaccess file was changing!
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The issue reported in the initial post occurred because the /usr/local/cpanel/bin/update_php_mime_types script ran during EasyApache. Creating that file prevents /usr/local/cpanel/bin/update_php_mime_types from running during EasyApache, and thus those entries in the .htaccess file are not modified.

    Thank you.
     
Loading...

Share This Page