Skip to content

Commit

Permalink
Location blocks can't be inherited by declaring them outside of a ser…
Browse files Browse the repository at this point in the history
…ver block.
  • Loading branch information
perlDreamer committed Jan 8, 2012
1 parent 4f3b86c commit 46180af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
7 changes: 0 additions & 7 deletions wre/var/setupfiles/nginx.conf
Expand Up @@ -27,13 +27,6 @@ http {
gzip_types text/plain text/css application/json application/json-rpc application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_comp_level 9;

location /extras/ {
add_header Cache-Control public;
expires 24h;
root /data/WebGUI/www/extras;
add_header Access-Control-Allow-Origin *;
}

##Include per-server vhost configuration files.
include [% config.getRoot %]/etc/*.nginx;

Expand Down
16 changes: 7 additions & 9 deletions wre/var/setupfiles/nginx.template
Expand Up @@ -16,17 +16,15 @@ server {
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:[% config.get('starman/port') %];
}
location /uploads {
expires 2h;
if ( $request_filename ~ "^(.*/)" ) {
set $request_directory $document_root$1;
}
if ( -f "$request_directory/.wgaccess" ) {
proxy_pass http://127.0.0.1:[% config.get('starman/port') %];
}

location /extras/ {
add_header Cache-Control public;
expires 24h;
root /data/WebGUI/www/extras;
add_header Access-Control-Allow-Origin *;
}

location /uploads/filepump { expires max; }
location /extras/ { expires 24h; }
location = /default.ida { access_log off; deny all; }
location /_vti_bin { access_log off; deny all; }
location /_mem_bin { access_log off; deny all; }
Expand Down

0 comments on commit 46180af

Please sign in to comment.