Skip to content

Instantly share code, notes, and snippets.

@jonmunson
Created April 16, 2017 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonmunson/eda32faeebe423707f18d713d6f3c59d to your computer and use it in GitHub Desktop.
Save jonmunson/eda32faeebe423707f18d713d6f3c59d to your computer and use it in GitHub Desktop.
Apache2 settings for optimum security - /etc/apache2/apache2.conf
<Directory /var/www/>
Options FollowSymLinks
AllowOverride None
Require all granted
Header always append X-Frame-Options SAMEORIGIN
Header set X-XSS-Protection "1; mode=block"
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
FileETag None
RewriteEngine On
RewriteCond %{THE_REQUEST} !HTTP/1\.1$
RewriteRule .* - [F]
deny from all
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment