Aleksander Machniak
2016-05-09 260811997f7d7ef98abbb191076faf03346b2823
commit | author | age
4c7a98 1 # AddDefaultCharset UTF-8
0d1dd7 2 AddType text/x-component .htc
ef9641 3
34942e 4 <IfModule mod_php5.c>
4c7a98 5 php_flag    display_errors  Off
AM 6 php_flag    log_errors      On
7 # php_value    error_log    logs/errors
aaa6ac 8
93e12f 9 php_value   upload_max_filesize   5M
AM 10 php_value   post_max_size         6M
4c7a98 11 php_value   memory_limit          64M
aaa6ac 12
4c7a98 13 php_flag    register_globals            Off
AM 14 php_flag    zlib.output_compression     Off
15 php_flag    magic_quotes_gpc            Off
16 php_flag    magic_quotes_runtime        Off
17 php_flag    suhosin.session.encrypt     Off
aaa6ac 18
4c7a98 19 #php_value   session.cookie_path     /
e2bcea 20 #php_value   session.hash_function   sha256
4c7a98 21 php_flag    session.auto_start       Off
AM 22 php_value   session.gc_maxlifetime   21600
23 php_value   session.gc_divisor       500
24 php_value   session.gc_probability   1
34942e 25 </IfModule>
4e17e6 26
34942e 27 <IfModule mod_rewrite.c>
0b9b9f 28 Options +FollowSymLinks
34942e 29 RewriteEngine On
aff970 30 RewriteRule ^favicon\.ico$ skins/larry/images/favicon.ico
88934b 31
2dade1 32 # security rules:
AM 33 # - deny access to files not containing a dot or starting with a dot
34 #   in all locations except installer directory
1c2aad 35 RewriteRule ^(?!installer|\.well-known\/|[a-zA-Z0-9]{16})(\.?[^\.]+)$ - [F]
2dade1 36 # - deny access to some locations
AM 37 RewriteRule ^/?(\.git|\.tx|SQL|bin|config|logs|temp|tests|program\/(include|lib|localization|steps)) - [F]
38 # - deny access to some documentation files
fd0583 39 RewriteRule /?(README\.md|composer\.json-dist|composer\.json|package\.xml|Dockerfile)$ - [F]
e3f427 40 </IfModule>
cb3ea1 41
d7f49d 42 <IfModule mod_deflate.c>
T 43 SetOutputFilter DEFLATE
44 </IfModule>
45
46 <IfModule mod_headers.c>
47 # replace 'append' with 'merge' for Apache version 2.2.9 and later
832890 48 #Header append Cache-Control public env=!NO_CACHE
7b4f71 49
R 50 # Optional security header
51 # Only increased security if the browser support those features
52 # Be careful! Testing is required! They should be adusted to your intallation / user environment
53
54 # HSTS - HTTP Strict Transport Security
55 #Header always set Strict-Transport-Security "max-age=31536000; preload" env=HTTPS
56
57 # HPKP - HTTP Public Key Pinning
58 # Only template - fill with your values
59 #Header always set Public-Key-Pins "max-age=3600; report-uri=\"\"; pin-sha256=\"\"; pin-sha256=\"\"" env=HTTPS
60
61 # X-Xss-Protection
62 # This header is used to configure the built in reflective XSS protection found in Internet Explorer, Chrome and Safari (Webkit). 
63 #Header set X-XSS-Protection "1; mode=block"
64
65 # X-Frame-Options
66 # The X-Frame-Options header (RFC), or XFO header, protects your visitors against clickjacking attacks
67 # Already set by php code! Do not activate both options
68 #Header set X-Frame-Options SAMEORIGIN
69
70 # X-Content-Type-Options
71 # It prevents Google Chrome and Internet Explorer from trying to mime-sniff the content-type of a response away from the one being declared by the server.
72 #Header set X-Content-Type-Options: "nosniff"
73
74 # CSP - Content Security Policy
348c53 75 # for better privacy/security ask browsers to not set the Referer
7b4f71 76 # more flags for script, stylesheets and images available, read RFC for more information
348c53 77 #Header set Content-Security-Policy "referrer no-referrer"
d7f49d 78 </IfModule>
T 79
80 <IfModule mod_expires.c>
81 ExpiresActive On
82 ExpiresDefault "access plus 1 month"
83 </IfModule>
84
2f1429 85 FileETag MTime Size
5e8c77 86
A 87 <IfModule mod_autoindex.c>
4b1d5d 88 Options -Indexes
5e8c77 89 </ifModule>