aboutsummaryrefslogtreecommitdiff
path: root/bugzilla/etc/nginx/sites-available/bugzilla
blob: d10798fbf885e024244df37f2fc1aa6c556d5851 (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
server {
    root /var/www/html/bugzilla;

    autoindex off;
    index index.cgi;

    location /attachments { return 403; }
    location /Bugzilla { return 403; }
    location /lib { return 403; }
    location /template { return 403; }
    location /contrib { return 403; }
    location /t { return 403; }
    location /xt { return 403; }
    location /data { return 403; }
    location /graphs { return 403; }
    location ~ (\.pm|\.pl|\.psgi|\.tmpl|localconfig.*|cpanfile)$ { return 403; }

    location ~ ^/data/webdot/[^/]*\.png$ { }
    location ~ ^/graphs/[^/]*\.(png|gif) { }

    location /rest {
        rewrite ^/rest/(.*)$ rest.cgi?$1 last;
    }

    location ~ \.(css|js)$ {
        expires 1y;
        add_header Cache-Control public;
    }

    location ~ \.cgi$ {
        include fastcgi_params;
        fastcgi_param SERVER_NAME 'bugs.crute.me';
        fastcgi_param SCRIPT_NAME '';
        fastcgi_param PATH_INFO $uri;
        fastcgi_param BZ_CACHE_CONTROL 1;
        fastcgi_pass localhost:9090;
    }

    gzip on;
    gzip_types text/xml application/rdf+xml;
}