Skip to content

Commit 46180af

Browse files
committedJan 8, 2012
Location blocks can't be inherited by declaring them outside of a server block.
1 parent 4f3b86c commit 46180af

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed
 

‎wre/var/setupfiles/nginx.conf

-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ http {
2727
gzip_types text/plain text/css application/json application/json-rpc application/x-javascript text/xml application/xml application/xml+rss text/javascript;
2828
gzip_comp_level 9;
2929

30-
location /extras/ {
31-
add_header Cache-Control public;
32-
expires 24h;
33-
root /data/WebGUI/www/extras;
34-
add_header Access-Control-Allow-Origin *;
35-
}
36-
3730
##Include per-server vhost configuration files.
3831
include [% config.getRoot %]/etc/*.nginx;
3932

‎wre/var/setupfiles/nginx.template

+7-9
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@ server {
1616
proxy_set_header Host $host;
1717
proxy_pass http://127.0.0.1:[% config.get('starman/port') %];
1818
}
19-
location /uploads {
20-
expires 2h;
21-
if ( $request_filename ~ "^(.*/)" ) {
22-
set $request_directory $document_root$1;
23-
}
24-
if ( -f "$request_directory/.wgaccess" ) {
25-
proxy_pass http://127.0.0.1:[% config.get('starman/port') %];
26-
}
19+
20+
location /extras/ {
21+
add_header Cache-Control public;
22+
expires 24h;
23+
root /data/WebGUI/www/extras;
24+
add_header Access-Control-Allow-Origin *;
2725
}
26+
2827
location /uploads/filepump { expires max; }
29-
location /extras/ { expires 24h; }
3028
location = /default.ida { access_log off; deny all; }
3129
location /_vti_bin { access_log off; deny all; }
3230
location /_mem_bin { access_log off; deny all; }

0 commit comments

Comments
 (0)
Please sign in to comment.