File: kopano-webapp-apache2.conf

package info (click to toggle)
kopano-webapp 3.5.14+dfsg1.orig-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 45,160 kB
  • sloc: php: 35,994; xml: 2,116; sh: 436; makefile: 370; java: 300; python: 152; ruby: 14
file content (89 lines) | stat: -rw-r--r-- 3,132 bytes parent folder | download | duplicates (2)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# example main configuration for kopano-webapp
#vim: set ft=apache ts=4 sw=4 expandtab :#

# Modules to enable for the caching instructions to work:
#   mod_expires
#   mod_headers
#   mod_setenvif - for Internet Explorer quirks
#
# For compression:
#   mod_deflate

<Directory /usr/share/kopano-webapp/>
    DirectoryIndex index.php
    Options -Indexes +FollowSymLinks
    AllowOverride Options

    <IfModule apparmor_module>
        AAHatName kopano-webapp
    </IfModule>

    # Only server Apache2.4
    <IfVersion >= 2.3>
        Require all granted
    </IfVersion>

    FileETag All

    # Uncomment to enhance security of WebApp by restricting cookies to
    # only be provided over HTTPS connections.
    # php_flag session.cookie_secure on
    # php_flag session.cookie_httponly on

    # The maximum POST limit. To upload large files, this value must be
    # larger than upload_max_filesize.
    php_value post_max_size 31M
    php_value upload_max_filesize 30M

    # Manipulate the cache control headers if mod_expires and
    # mod_headers are both enabled; otherwise the client will depend
    # on the ETag header.  However, you can set FileETag to "None" if
    # you have multiple servers serving WebApp to the same user.  In
    # that case, apache will fall back to the config below so make
    # sure these two modules are loaded!
    <IfModule expires_module>
        <IfModule headers_module>
            ExpiresActive On
            ExpiresDefault "now"

            <FilesMatch "\.(jpg|gif|png)$">
                # All (static) resources set to 2 months expiration time.
                ExpiresDefault "access plus 2 months"
                Header append Cache-Control "public"
            </FilesMatch>

            <FilesMatch "\.(js|css)$">
                # All non-dynamic files set to 2 weeks expiration time.
                ExpiresDefault "access plus 2 weeks"
                # User agents are requested to revalidate for each resource
                # so that the server can always serve a newer version if
                # necessary.
                Header append Cache-Control "no-cache, must-revalidate"

                # Treat IE a little differently due to the remarks on no-cache
                # on http://support.microsoft.com/kb/234067
                <IfModule setenvif_module>
                    BrowserMatch MSIE ie_bug
                </IfModule>
                Header set Cache-Control "must-revalidate, private" env=ie_bug
            </FilesMatch>

            <filesMatch "\.(php)$">
                # PHP files must always be retrieved from the server.
                ExpiresActive Off
                Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
                Header set Pragma "no-cache"
            </filesMatch>
        </IfModule>
    </IfModule>

    # Enable gzip compression if the module is available
    <IfModule deflate_module>
        <filesMatch "\.(js|css)$">
            SetOutputFilter DEFLATE
        </filesMatch>
    </IfModule>

</Directory>

# vim: autoindent ts=4 sw=4 expandtab softtabstop=4 ft=conf