Попробовал так location / { add_before_body /before_action; add_after_body /after_action; } location = /before_action { root before_action/50x.html; } location = /after_action { root after/50x.html; } Но ничего так и нет Posted at Nginx Forum: http://forum.nginx.org/read.php?21,114834,115795#msg-115795