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.

.htaccess

Discussion in 'General Discussion' started by ASTRAPI, May 28, 2009.

  1. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Hello

    How can i enable/disable this option for user accounts?


    Thanks
     
  2. viraj

    viraj Well-Known Member

    Joined:
    Sep 28, 2006
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    You can disable .htaccess for a particular domain by editing the /etc/httpd/conf/httpd.conf file & following the below mentioned steps:

    Open the /etc/httpd/conf/httpd.conf file.
    Search for the "AllowOverride None" string.

    it'd look like :
    Append it by:
    Such that it looks like:
    Doing so would disable the .httaccess for that particular username/domain.
     
  3. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    And to enable it?
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
  5. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Actually viraj made a typographical error just as a matter
    of technical correction. The root directory location
    section ("/") of your httpd.conf file has a default setting
    of "AllowOverride All" which means to allow
    .HTACCESS files instead of "AllowOverride None".

    (If you search for "AllowOverride None" in that section
    then you probably wouldn't find anything unless your
    httpd.conf file has already been misconfigured)

    After that, you should indeed put "AllowOverride None"
    in a separate location as viraj told you and that part
    of what they told you is correct. Although a better
    way to do that might be to do it as a vhost include
    file just so you don't have to constantly re-edit your
    main httpd.conf file or have to remember to keep
    it matched up to your actual active accounts.
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    It apparently gets better and better (yes that was sarcasm) ...

    Last night I took apart a server and went over all the configuration
    lines in httpd.conf and the other files loaded and found that the
    configuration for .HTACCESS was indeed accurate in the main
    files but not listed for the virtualhost.

    Thinking the directives might actually need to be in the virtualhost
    sections as well, I ran a few more test with those added and the
    Apache server restarted but no such luck there either but then
    I ran tests with Auth (Deny From / Allow From) directives added
    directly to the httpd.conf file and found those don't work either!

    So in a nutshell, the servers are not only not reading the .HTACCESS
    commands but they apparently are ignoring all authentication commands
    entirely which is now making me wonder if MOD_AUTH was forgotten
    in the Apache Build. If you go into Easy_Apache, it's not listed as a
    build option but you would think Cpanel would know to add that one
    by default into the build.

    Anyway, bottom line is the servers aren't processing any authentication
    commands whatsoever irregardless of .HTACCESS or HTTPD.CONF location
    and the .HTACCESS files aren't being parsed at all despite configuration.
     
  7. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16

    and what about for plural
     
  8. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    And what about for plural
     
  9. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I would recommend working with our technical analysts so they can diagnose what is causing this behavior on your server(s): http://tickets.cPanel.net/submit
     
  10. viraj

    viraj Well-Known Member

    Joined:
    Sep 28, 2006
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Thank you for pointing that out, but I am sure I posted it when I was 100% sure :D

    No matter what you include in the httpd.conf, it wont work :) Let me know if the solution provided by me didnt work out for you.. Good luck :)
     
Loading...

Share This Page