This is an old revision of the document!


Install bugzilla in nginx

server {
    listen      80;
    server_name  <bugzilla url>;

    keepalive_timeout    70;
    charset utf-8;

    root       <path to bugzilla folder>;
    index      index.cgi;
    autoindex off;

    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 /rest {
        rewrite ^/rest/(.*)$ rest.cgi/$1 last;
    }

    location ~ (\.pm|\.pl|\.psgi|\.tmpl|localconfig.*|cpanfile)$ { return 403; }

    # if you are using webdot. adjust the IP to point to your webdot server.
    #location ~ ^/data/webdot/[^/]*\.dot$ { allow 127.0.0.1; deny all; }
    location ~ ^/data/webdot/[^/]*\.png$ { }
    location ~ ^/graphs/[^/]*\.(png|gif) { }
    location ~ \.(css|js)$ {
        expires 1y;
        add_header Cache-Control public;
    }
    location ~ \.cgi$ {
        fastcgi_pass  unix:/var/run/fcgiwrap.socket;
        fastcgi_index index.cgi;
        fastcgi_param SCRIPT_FILENAME <path to bugzilla folder>$fastcgi_script_name;
        fastcgi_param PATH_INFO $uri;
        fastcgi_param BZ_CACHE_CONTROL 1;
        include /etc/nginx/fastcgi_params;
    }

    # optional but highly recommended due to the large sizes of these files
    gzip on;
    # add whatever global types you have specified; this option does not stack.
    gzip_types text/xml application/rdf+xml;
}
kb/nginx/install_bugzilla_in_nginx.1472029020.txt.gz · Last modified: (external edit)
Back to top
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0