########################################################################################## MISC-4: Build custom error pages ########################################################################################## Issue Type: Sub-task ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Closed Resolution: Done (2017-07-06 15:55:32) Project: Miscellaneous (MISC) Reported By: btasker Assigned To: btasker Child of: MISC-2 - Make bentasker.co.uk Available as Tor Hidden Service Affected Versions: - Bentasker.co.uk via Tor Targeted for fix in version: - Bentasker.co.uk via Tor Time Estimate: 0 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== For any error generated by the reverse proxy at Tor's end, need to create a custom error page detailing useful information (for example, where we block _tor2web_ it'd be helpful to explain why the request has been blocked). ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2015-05-21 16:29:58 ----------------------------------------------------------------------------------------- btasker changed status from 'Open' to 'In Progress' ----------------------------------------------------------------------------------------- 2015-05-22 15:42:00 btasker ----------------------------------------------------------------------------------------- Have configured a basic notification page for tor2web pages, but because NGinx is being a pain, it doesn't really return an appropriate status code. Currently it'll 301 the visitor to a page called 405.html which details why the request was blocked. For some reason, NGinx seems to be quite determined not to use custom error pages for 405/406 etc, will come back and look at sorting that out later. For now the config in place is -- BEGIN SNIPPET -- error_page 405 = /405.html; # This has no impact currently location /405.html { root /usr/share/nginx/onions/bentaskercouk; } if ($http_x_tor2web){ set $tor2web T; } # Avoid redirect loops if ($request_uri = '/405.html'){ set $tor2web R; } if ($tor2web = T){ return 301 /405.html; } -- END SNIPPET -- ----------------------------------------------------------------------------------------- 2015-05-22 17:24:51 btasker ----------------------------------------------------------------------------------------- Will get the 50x error page built a little later ----------------------------------------------------------------------------------------- 2017-07-06 15:55:32 ----------------------------------------------------------------------------------------- btasker changed status from 'In Progress' to 'Resolved' ----------------------------------------------------------------------------------------- 2017-07-06 15:55:32 ----------------------------------------------------------------------------------------- btasker added 'Done' to resolution ----------------------------------------------------------------------------------------- 2017-07-06 15:55:37 ----------------------------------------------------------------------------------------- btasker changed status from 'Resolved' to 'Closed'