~libravatar/libravatar/master

« back to all changes in this revision

Viewing changes to config/www.apache2.conf

  • Committer: Francois Marier
  • Date: 2011-01-02 04:36:09 UTC
  • Revision ID: git-v1:4ed9aac9f0228f8a4ae4fff124263427d263a51e
Move all static files to both CDNs

This was a recommendation of Pagespeed (serve static files on a cookie-less
domain) but is also a good way to simplify things and avoid serving the
same files on two domains.

The libravatar-common packages is no longer needed by libravatar-www since
it only contains common CDN files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
        ExpiresActive On
8
8
        ExpiresDefault "access plus 1 seconds"
9
9
        ExpiresByType text/html "access plus 1 seconds"
10
 
        ExpiresByType image/gif "access plus 1 week"
11
 
        ExpiresByType image/jpeg "access plus 1 week"
12
 
        ExpiresByType image/png "access plus 1 week"
 
10
        ExpiresByType text/plain "access plus 1 week"
13
11
        ExpiresByType image/x-icon "access plus 1 week"
14
 
        ExpiresByType text/css "access plus 1 week"
15
 
        ExpiresByType text/javascript "access plus 1 week"
16
 
        ExpiresByType application/x-javascript "access plus 1 week"
17
 
        ExpiresByType application/javascript "access plus 1 week"
18
12
        ExpiresByType text/xml "access plus 1 seconds"
19
13
    </IfModule>
20
14
 
21
 
    Alias /favicon.ico /usr/share/libravatar/static/img/favicon.ico
22
 
    Alias /robots.txt /usr/share/libravatar/static/robots.txt
23
 
    Alias /css /usr/share/libravatar/static/css
24
 
    Alias /img /usr/share/libravatar/static/img
25
 
    Alias /js /usr/share/libravatar/static/js
 
15
    Alias /favicon.ico /usr/share/libravatar/libravatar/favicon.ico
 
16
    Alias /robots.txt /usr/share/libravatar/libravatar/robots.txt
26
17
    Alias /uploaded /var/lib/libravatar/uploaded
27
18
    Alias /user /var/lib/libravatar/user
28
19
 
34
25
    <Location /user>
35
26
        ExpiresByType image/jpeg "access"
36
27
        ExpiresByType image/png "access"
37
 
        ErrorDocument 404 /img/missing.png
38
 
    </Location>
39
 
 
40
 
    # Take advantage of precompressed files when they exist
41
 
    <Location /css>
42
 
        AddEncoding gzip gz
43
 
        Options +Multiviews
44
 
    </Location>
45
 
    <Location /js>
46
 
        AddEncoding gzip gz
47
 
        Options +Multiviews
 
28
        ErrorDocument 404 __CDNSERVERNAME__/img/missing.png
48
29
    </Location>
49
30
 
50
31
    # Clients should be using cdn.libravatar.org/avatar/