summaryrefslogtreecommitdiffstats
path: root/owncloud-defaults.inc
blob: 4c7290f6a8470a1359e92e77c7030ef302d3604f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# These are based on the .htaccess file shipped by ownCloud, with
# appropriate adjustments for distribution packaging. Some directives
# that are irrelevant to the Fedora/EPEL ecosystem are omitted. This
# file contains directives that should be applied within the /owncloud
# filesystem; directives that should be applied site-wide when
# ownCloud is installed are placed directly in owncloud.conf.
#
# DO NOT EDIT THIS FILE DIRECTLY. To override any element of the
# packaged ownCloud configuration, create a new /etc/httpd/conf.d/
# file which will be read later than 'owncloud.conf'.

AllowOverride None

ErrorDocument 403 /owncloud/core/templates/403.php
ErrorDocument 404 /owncloud/core/templates/404.php

<IfModule mod_fcgid.c>
    <IfModule mod_setenvif.c>
        <IfModule mod_headers.c>
            SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
            RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
        </IfModule>
    </IfModule>
</IfModule>

<IfModule mod_php5.c>
    php_value upload_max_filesize 10G
    php_value post_max_size 10G
    php_value memory_limit 512M
    php_value mbstring.func_overload 0
    php_value always_populate_raw_post_data -1
    php_value default_charset 'UTF-8'
    php_value output_buffering off
    <IfModule mod_env.c>
        SetEnv htaccessWorking true
    </IfModule>
</IfModule>

<IfModule mod_php7.c>
    php_value upload_max_filesize 10G
    php_value post_max_size 10G
    php_value memory_limit 512M
    php_value mbstring.func_overload 0
    php_value always_populate_raw_post_data -1
    php_value default_charset 'UTF-8'
    php_value output_buffering off
    <IfModule mod_env.c>
        SetEnv htaccessWorking true
    </IfModule>
</IfModule>

# The rewrites for legacy caldav and carddav URLs are omitted here
# because they do not work with Fedora's ownCloud directory layout.
# See https://github.com/owncloud/core/issues/243#issuecomment-75426453
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /owncloud/
    RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteRule ^remote/(.*) remote.php [QSA,L]
</IfModule>

AddDefaultCharset utf-8
Options -Indexes

<IfModule pagespeed_module>
    ModPagespeed Off
</IfModule>

<IfModule mod_headers.c>
    <FilesMatch "\.(css|js)$">
        Header set Cache-Control "max-age=7200, public"
    </FilesMatch>
</IfModule>