Tuesday, November 22, 2016

Secure Apache from Clickjacking

open Terminal
use below command

curl -I http://localhost/ or http://serverIP/

check, is it showing any lines with X-Frame options or not if not follow the steps below

Open httpd.conf and append one line at the bottom of the file.

Header always append X-Frame-Options SAMEORIGIN
             
or you can append the below line

Header always append X-Frame-Options DENY

now save and close the file

To verify the syntax error run the below command

httpd -t it will show SYNTAX OK

now restart the service of apache/httpd