Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
kb:nginx:install_bugzilla_in_nginx [2016/08/24 08:57] – created yehuda | kb:nginx:install_bugzilla_in_nginx [2022/01/03 16:03] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
server { | server { | ||
listen | listen | ||
- | server_name | + | server_name |
+ | |||
+ | access_log / | ||
+ | error_log | ||
keepalive_timeout | keepalive_timeout | ||
+ | |||
charset utf-8; | charset utf-8; | ||
- | root <path to bugzilla folder>; | + | root / |
index index.cgi; | index index.cgi; | ||
autoindex off; | autoindex off; | ||
- | location / | ||
- | 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 ^/ | ||
- | } | ||
- | location ~ (\.pm|\.pl|\.psgi|\.tmpl|localconfig.*|cpanfile)$ { return 403; } | + | location ~ ^.*\.cgi$ { |
+ | fastcgi_pass | ||
- | # if you are using webdot. adjust the IP to point to your webdot server. | ||
- | #location ~ ^/ | ||
- | location ~ ^/ | ||
- | location ~ ^/ | ||
- | location ~ \.(css|js)$ { | ||
- | expires 1y; | ||
- | add_header Cache-Control public; | ||
- | } | ||
- | location ~ \.cgi$ { | ||
- | fastcgi_pass | ||
fastcgi_index index.cgi; | fastcgi_index index.cgi; | ||
- | fastcgi_param SCRIPT_FILENAME | + | fastcgi_param SCRIPT_FILENAME |
- | fastcgi_param PATH_INFO $uri; | + | |
- | fastcgi_param BZ_CACHE_CONTROL 1; | + | |
include / | include / | ||
} | } | ||
- | |||
- | # 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/ | ||
} | } | ||
+ | |||
</ | </ | ||