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

Last change on this file since 1391 was 1391, checked in by jrpelegrina, 5 years ago

Wip in update to owncloud 9

File size: 3.7 KB
Line 
1# Version:9.0.1.3
2<IfModule mod_headers.c>
3  <IfModule mod_setenvif.c>
4    <IfModule mod_fcgid.c>
5       SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
6       RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
7    </IfModule>
8    <IfModule mod_proxy_fcgi.c>
9       SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1
10    </IfModule>
11  </IfModule>
12
13  <IfModule mod_env.c>
14    # Add security and privacy related headers
15    Header set X-Content-Type-Options "nosniff"
16    Header set X-XSS-Protection "1; mode=block"
17    Header set X-Robots-Tag "none"
18    Header set X-Frame-Options "SAMEORIGIN"
19    Header set X-Download-Options "noopen"
20    Header set X-Permitted-Cross-Domain-Policies "none"
21    SetEnv modHeadersAvailable true
22  </IfModule>
23
24  # Add cache control for CSS and JS files
25  <FilesMatch "\.(css|js)$">
26    Header set Cache-Control "max-age=7200, public"
27  </FilesMatch>
28</IfModule>
29<IfModule mod_php5.c>
30  php_value upload_max_filesize 513M
31  php_value post_max_size 513M
32  php_value memory_limit 512M
33  php_value mbstring.func_overload 0
34  php_value always_populate_raw_post_data -1
35  php_value default_charset 'UTF-8'
36  php_value output_buffering 0
37  <IfModule mod_env.c>
38    SetEnv htaccessWorking true
39  </IfModule>
40</IfModule>
41<IfModule mod_php7.c>
42  php_value upload_max_filesize 513M
43  php_value post_max_size 513M
44  php_value memory_limit 512M
45  php_value mbstring.func_overload 0
46  php_value default_charset 'UTF-8'
47  php_value output_buffering 0
48  <IfModule mod_env.c>
49    SetEnv htaccessWorking true
50  </IfModule>
51</IfModule>
52<IfModule mod_rewrite.c>
53  RewriteEngine on
54  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
55  RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
56  RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
57  RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
58  RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
59  RewriteRule ^remote/(.*) remote.php [QSA,L]
60  RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
61  RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
62  RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
63
64  # Rewrite rules for `front_controller_active`
65  Options -MultiViews
66  RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
67  RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
68  RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$
69  RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$
70  RewriteCond %{REQUEST_FILENAME} !/remote.php
71  RewriteCond %{REQUEST_FILENAME} !/public.php
72  RewriteCond %{REQUEST_FILENAME} !/cron.php
73  RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php
74  RewriteCond %{REQUEST_FILENAME} !/status.php
75  RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php
76  RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php
77  RewriteCond %{REQUEST_FILENAME} !/updater/
78  RewriteCond %{REQUEST_FILENAME} !/ocs-provider/
79  RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
80</IfModule>
81<IfModule mod_mime.c>
82  AddType image/svg+xml svg svgz
83  AddEncoding gzip svgz
84</IfModule>
85<IfModule mod_dir.c>
86  DirectoryIndex index.php index.html
87</IfModule>
88AddDefaultCharset utf-8
89Options -Indexes
90<IfModule pagespeed_module>
91  ModPagespeed Off
92</IfModule>
93#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####
94
95ErrorDocument 403 /owncloud/core/templates/403.php
96ErrorDocument 404 /owncloud/core/templates/404.php
97<IfModule mod_rewrite.c>
98  RewriteRule . index.php [PT,E=PATH_INFO:$1]
99  RewriteBase /owncloud
100  <IfModule mod_env.c>
101    SetEnv front_controller_active true
102    <IfModule mod_dir.c>
103      DirectorySlash off
104    </IfModule>
105  </IfModule>
106</IfModule>
Note: See TracBrowser for help on using the repository browser.