File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ server {
8080 # checks for static file, if not found proxy to app
8181 try_files $uri @django;
8282 }
83+
8384 location @django {
8485 # Cache
8586 proxy_cache_valid 200 301 302 401 403 404 1d ;
@@ -97,6 +98,7 @@ server {
9798 proxy_redirect off;
9899 proxy_pass http ://django_server;
99100 }
101+
100102 location @django-admin-slow {
101103 # https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_send_timeout
102104 proxy_connect_timeout 120s ;
@@ -121,4 +123,12 @@ server {
121123 proxy_redirect off;
122124 proxy_pass http ://django_server;
123125 }
126+
127+ proxy_intercept_errors on;
128+ error_page 500 501 502 503 504 505 506 /500 .html;
129+
130+ location = /500 .html {
131+ root /app/static;
132+ internal ;
133+ }
124134}
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
6+
7+ < title > Wikimedia External Links Tool</ title >
8+
9+ < link rel ="icon " type ="image/png " href ="/static/favicon.ico ">
10+ < link rel ="stylesheet " href ="https://tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css " integrity ="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T " crossorigin ="anonymous ">
11+ < link rel ="stylesheet " href ="/static/css/local.css " type ="text/css ">
12+ </ head >
13+
14+ < body >
15+ < nav class ="navbar navbar-expand-lg navbar-light shadow-sm ">
16+ < a class ="navbar-brand " href ="/ "> Wikilink</ a >
17+ < div class ="navbar-nav ">
18+ < a class ="nav-item nav-link " href ="/programs/ "> Programs</ a >
19+ < a class ="nav-item nav-link " href ="/organisations/ "> Organisations</ a >
20+ < a class ="nav-item nav-link " href ="/docs "> What is this?</ a >
21+ </ div >
22+ </ nav >
23+
24+ < div class ="main-content ">
25+ < div class ="body ">
26+ < h1 > 500 Internal Server Error</ h1 >
27+ < p > Sorry; something went wrong.</ p >
28+ </ div >
29+ </ div >
30+
31+ < hr />
32+
33+ < div class ="footer ">
34+ A < a href ="https://meta.wikimedia.org/wiki/The_Wikipedia_Library "> Wikipedia Library</ a > project -
35+ < a href ="https://github.com/WikipediaLibrary/externallinks "> Github</ a > -
36+ < a href ="https://phabricator.wikimedia.org/project/board/4082/ "> Phabricator</ a > -
37+ < a href ="https://meta.wikimedia.org/wiki/Wikilink_tool "> Meta</ a >
38+ </ div >
39+
40+ < script type ="text/javascript " src ="https://tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js " integrity ="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM " crossorigin ="anonymous "> </ script >
41+ </ body >
42+ </ html >
You can’t perform that action at this time.
0 commit comments