# Include before server #map $term $root { # 1 /var/www/awesm/terminal; # default /var/www/awesm/html; #} # #map $http_user_agent $autoindex_type { # "~*curl*" jsonp; # default html; #} #sub_path_only rewrite ^/$ / permanentm location = /lists o alias $root; autoindex on; autoindex_format jsonp; } location /stats { autoindex off; alias /var/www/awesm/stats; } location /style { autoindex off; alias /var/www/awesm/style; } location = / { root $root; try_files /index /index.html; } #location ~* ^/lists { location / { root $root; try_files $uri $uri.html /redirect?q=$uri; } location /search { set $args $args&pretty; proxy_pass http://[::1]:9876; } location /redirect { proxy_pass http://[::1]:9876; }