source: lliurex-owncloud/trunk/fuentes/install-files/etc/apache2/conf-available/owncloud.conf @ 3228

Last change on this file since 3228 was 3228, checked in by jrpelegrina, 4 years ago

Wip in new version of owncloud_9.1.3

File size: 2.4 KB
Line 
1<IfModule mod_headers.c>
2  <IfModule mod_setenvif.c>
3    <IfModule mod_fcgid.c>
4       SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
5       RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
6    </IfModule>
7    <IfModule mod_proxy_fcgi.c>
8       SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1
9    </IfModule>
10  </IfModule>
11
12  <IfModule mod_env.c>
13    # Add security and privacy related headers
14    Header set X-Content-Type-Options "nosniff"
15    Header set X-XSS-Protection "1; mode=block"
16    Header set X-Robots-Tag "none"
17    Header set X-Frame-Options "SAMEORIGIN"
18    Header set X-Download-Options "noopen"
19    Header set X-Permitted-Cross-Domain-Policies "none"
20    SetEnv modHeadersAvailable true
21  </IfModule>
22
23  # Add cache control for CSS and JS files
24  <FilesMatch "\.(css|js)$">
25    Header set Cache-Control "max-age=7200, public"
26  </FilesMatch>
27</IfModule>
28<IfModule mod_php5.c>
29  php_value upload_max_filesize 513M
30  php_value post_max_size 513M
31  php_value memory_limit 512M
32  php_value mbstring.func_overload 0
33  php_value always_populate_raw_post_data -1
34  php_value default_charset 'UTF-8'
35  php_value output_buffering 0
36  <IfModule mod_env.c>
37    SetEnv htaccessWorking true
38  </IfModule>
39</IfModule>
40<IfModule mod_php7.c>
41  php_value upload_max_filesize 513M
42  php_value post_max_size 513M
43  php_value memory_limit 512M
44  php_value mbstring.func_overload 0
45  php_value default_charset 'UTF-8'
46  php_value output_buffering 0
47  <IfModule mod_env.c>
48    SetEnv htaccessWorking true
49  </IfModule>
50</IfModule>
51<IfModule mod_rewrite.c>
52  RewriteEngine on
53  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
54  RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
55  RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
56  RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
57  RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
58  RewriteRule ^remote/(.*) remote.php [QSA,L]
59  RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
60  RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
61  RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
62</IfModule>
63<IfModule mod_mime.c>
64  AddType image/svg+xml svg svgz
65  AddEncoding gzip svgz
66</IfModule>
67<IfModule mod_dir.c>
68  DirectoryIndex index.php index.html
69</IfModule>
70AddDefaultCharset utf-8
71Options -Indexes
72<IfModule pagespeed_module>
73  ModPagespeed Off
74</IfModule>
Note: See TracBrowser for help on using the repository browser.