Skip to content

Instantly share code, notes, and snippets.

@markus2120
Last active September 26, 2018 15:30
Show Gist options
  • Save markus2120/3db0910d3155e0f5f7f060983e87145e to your computer and use it in GitHub Desktop.
Save markus2120/3db0910d3155e0f5f7f060983e87145e to your computer and use it in GitHub Desktop.
Edit apache.conf file at /etc/apache2/sites-enabled/redacted-le-ssl.conf THis file was based on https://securityheaders.com
<IfModule mod_ssl.c>
<VirtualHost 1.2.3.4:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/something
ServerName something.example.com
Header always set Strict-Transport-Security "max-age=31536000; includeSubdomains;"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-Xss-Protection "1; mode=block"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "same-origin"
Header always set Feature-Policy "microphone 'none'; payment 'none'; camera 'none'; sync-xhr 'self'"
Header always set Content-Security-Policy: "default-src https:;"
<Directory />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment