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