Source

ng_proxy_test / conf / nginx / ng_proxy_test.conf

Full commit
upstream ng_proxy_test_master {
	server localhost:10001;
}

upstream ng_proxy_test_comments {
	server localhost:10002;
}

proxy_temp_path   /var/cache/nginx/tmp;
proxy_cache_path  /var/cache/nginx levels=1:2 keys_zone=ng_proxy_test_master_cache:8m max_size=100m inactive=100m;

server {
	listen 80;
	server_name location;
	ssi on;

	location @ng_proxy_test_master_fallback{
		proxy_pass http://ng_proxy_test_master;

		# cache on disk
		proxy_cache ng_proxy_test_master_cache;
		proxy_cache_valid  200 302  20s;
		proxy_cache_valid  404      10s;

	}
	location @ng_proxy_test_comments_fallback{
		proxy_pass http://ng_proxy_test_comments;
	}
	location / {
	}
	location /ssi/comments/ {
		set            $redis_key $uri;
		redis_pass     localhost:6379;
		default_type   text/html;
		error_page     404 = @ng_proxy_test_comments_fallback;
	}
}