I am trying to solve the below option on my website
Strict-Transport-Security
Content-Security-Policy
X-Frame-Options
X-Content-Type-Options
Referrer-Policy
Permissions-Policy
I found the below code on Google and added the same in /etc/apache2/apache2.conf
file
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Order Allow,Deny
Allow from all
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Credentials true
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
Header set Access-Control-Max-Age "1000"
Header set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
</Directory>
After adding the above code I am getting below error
sudo service apache2 restart
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
I have scanned my website in this URL: https://securityheaders.com/, and it shows an F result. here is the result link
I have to solve those issues, so I researched Google and found the header code to add to the Apache config file. so I have added the same code and got an error...