Commits

Ales Zoulek committed e339143

failover

Comments (0)

Files changed (2)

conf/nginx/ng_proxy_test.conf

 	server_name location;
 	ssi on;
 
-	location / {
+	location @ng_proxy_test_master_fallback{
 		proxy_pass http://ng_proxy_test_master;
 	}
+	location / {
+		set $redis_key $uri;
+		redis_pass localhost:6379;
+		default_type   text/html;
+		error_page     404 = @ng_proxy_test_master_fallback;
+	}
 	location /ssi/comments/ {
 		proxy_pass http://ng_proxy_test_comments;
 	}

ng_proxy_test/content/templates/detail.html

 
 <h2>{{article.name}}</h2>
 <div>{{article.text}}</div>
+
+<h3>Comments:</h3>
 {% if settings.USE_SSI %}
-<!--# include virtual="{% url ssi-comments-list article.pk %}" -->
+<!--# block name="comments-list" --> Comments are not available right now! Sorry.. <!--# endblock -->
+<!--# include virtual="{% url ssi-comments-list article.pk %}" stub="comments-list" -->
 {% else %}
 {% render_comment_list for article %}
 {% endif %}