Skip to main content

AllowOveride None to Home Directories

Comments

9 comments

  • cPanelMichael
    Hello, You can take the the following steps modify the entry: 1. Copy the Apache 2.4 template for EasyApache 4 to allow for customization:
    cp -a /var/cpanel/templates/apache2_4/ea4_main.default /var/cpanel/templates/apache2_4/ea4_main.local
    2. Edit /var/cpanel/templates/apache2_4/ea4_main.local to change the AllowOverride entry to none:
    vi /var/cpanel/templates/apache2_4/ea4_main.local
    3. Save the changes, and then run:
    /scripts/rebuildhttpdconf
    Let us know if this helps. Thank you.
    0
  • ItsMattSon
    Hi @cPanelMichael, The solution looked promising, but upon editing ea4_main.local and rebuilding httpd conf (definitely has changed in /usr/local/apache/conf/httpd.conf), I can still use .htaccess files in my user accounts. Shouldn't the below have disabled that? AllowOverride None Options FollowSymLinks Indexes SymLinksIfOwnerMatch
    0
  • cPanelMichael
    Hello, Could you let us know the specific entries in your .htaccess files that are still working? Are you attempting to disable .htaccess usage completely? If so, you'd have to add an additional line under "AllowOverride None" for "AllowOverrideList". For example:
    AllowOverrideList Redirect RedirectMatch
    The Apache documentation explains how this works at: core - Apache HTTP Server Version 2.4 Thanks!
    0
  • ItsMattSon
    Hi Michael, I just set "Options Includes" in .htaccess in /home/user/public_html and put an local_date SSI in my index and it showed up. Without it in htaccess though, it's disabled by default thanks to your help in another thread (unticked it in the WHM's Apache Configuration). I thought that AllowOverride None would prevent any overrides? Theoretically, I shouldn't have to completely disable .htaccess with AllowOverrideList, should I?
    0
  • cPanelMichael
    Please post the output from:
    grep AllowOverride /var/cpanel/templates/apache2_4/* grep AllowOverride /usr/local/apache/conf/includes/*
    Thank you.
    0
  • ItsMattSon
    Thanks for replying, Michael. Here's a screenshot of the output:
    0
  • cPanelMichael
    Could you open a support ticket using the link in my signature so we can take a closer look and determine why it's not working? You can post the ticket number here and I'll update this thread with the outcome. Thank you.
    0
  • ItsMattSon
    Hi @cPanelMichael, All sorted! I believe there must have been some failure in the rebuilding of the conf file (maybe on my part, not sure). The good news is that I can't seem to replicate the error anymore as of today (I hadn't actually tried since 11th Nov when I first posted the odd behavior in this thread). I can only assume that it was fixed when the upcp cron ran between then and now (which it does every night). Thanks very much for the help as always!
    0
  • cPanelMichael
    Hello, I'm happy to see the issue is now resolved. It's working as intended on a test system as well, but feel free to let us know if you encounter any additional issues related to this topic. Thanks!
    0

Please sign in to leave a comment.