viraj

Well-Known Member
Sep 28, 2006
209
3
168
India
cPanel Access Level
DataCenter Provider
Twitter
Hello

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


Thanks
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 :
<Directory "/">
AllowOverride None
</Directory>
Append it by:
<Directory "/home/username/public_html">
AllowOverride None
</Directory>
Such that it looks like:
<Directory "/">
AllowOverride None
</Directory>

<Directory "/home/username/public_html">
AllowOverride None
</Directory>
Doing so would disable the .httaccess for that particular username/domain.
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
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.
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
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.
 

crazyaboutlinux

Well-Known Member
Nov 3, 2007
939
1
66
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.

and what about for plural
 

crazyaboutlinux

Well-Known Member
Nov 3, 2007
939
1
66
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.
And what about for plural
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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.
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
 

viraj

Well-Known Member
Sep 28, 2006
209
3
168
India
cPanel Access Level
DataCenter Provider
Twitter
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.
Thank you for pointing that out, but I am sure I posted it when I was 100% sure :D

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.
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 :)