Disable Options And Disable Override On Apache

Desperados

Verified User
Joined
Jan 2, 2017
Messages
37
Hello, I Need Disable Some Options On Apache and also disable Override by users

for example : FollowSymLinks , Includes , .....

on cPanel Servers i add this code :

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

on in /usr/local/apache/conf/includes/pre_virtualhost_global.conf

and restart apache.

then users can not enable options by .htaccess or override setting.

how i can do this on DirectAdmin ?

Best Regards,
 
Hello,

Code:
mkdir -p /usr/local/directadmin/custombuild/custom/ap2/conf/extra/
cd /usr/local/directadmin/custombuild/custom/ap2/conf/extra/
cp /usr/local/directadmin/custombuild/configure/ap2/conf/extra/httpd-directories-*.conf .

Then edit the both files:

httpd-directories-new.conf
httpd-directories-old.conf

in /usr/local/directadmin/custombuild/custom/ap2/conf/extra/ to meet your needs.

It is section:

Code:
<Directory /home>
...
...
...
</Directory>

Then run

Code:
cd /usr/local/directadmin/custombuild/
./build update
./build rewrite_confs

That will update the configs.
 
Back
Top