httpd.conf How to make mods Sticky

santrix

Well-Known Member
Nov 30, 2008
225
2
68
I want to change

<Directory "/">
Options ExecCGI FollowSymLinks Includes IncludesNOEXEC -Indexes -MultiViews SymLinksIfOwnerMatch
AllowOverride All
</Directory>

to

<Directory "/">
Options ExecCGI FollowSymLinks Includes IncludesNOEXEC -Indexes -MultiViews SymLinksIfOwnerMatch
AllowOverride AuthConfig FileInfo Indexes Limit
</Directory>

I want to force this so that it is not going to get overwritten next time upcp runs... Whichi s the best file to modify?

/var/cpanel/templates/apache2/main.default around line 72 contains:

<Directory "[% main.maindirectory.item.directory %]">
Options [% main.directory.options.item.options %]
AllowOverride [% main.directory.allowoverride.item.allowoverride %]
</Directory>

Is this the place? Is there a way to set the variable main.directory.allowoverride.item.allowoverride ??? rather than just overwriting it?
 
Last edited:

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
You can make the changes in the Apache configuration itself i.e.

/usr/local/apache/conf/httpd.conf
and once done, run the distiller i.e. execute the following commands to make the changes permanent

/usr/local/cpanel/bin/apache_conf_distiller --update
/usr/local/cpanel/bin/build_apache_conf
/etc/init.d/apache restart
 

santrix

Well-Known Member
Nov 30, 2008
225
2
68
I don't think that will work because every night /scripts/checkallowoverride runs, and will probably overwrite this entry...