forked from bartosjiri/nginx-errors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-errors.conf
64 lines (59 loc) · 2.94 KB
/
nginx-errors.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
error_page 400 /nginx-errors-ptbr/errors/400.html;
error_page 401 /nginx-errors-ptbr/errors/401.html;
error_page 402 /nginx-errors-ptbr/errors/402.html;
error_page 403 /nginx-errors-ptbr/errors/403.html;
error_page 404 /nginx-errors-ptbr/errors/404.html;
error_page 405 /nginx-errors-ptbr/errors/405.html;
error_page 406 /nginx-errors-ptbr/errors/406.html;
error_page 407 /nginx-errors-ptbr/errors/407.html;
error_page 408 /nginx-errors-ptbr/errors/408.html;
error_page 409 /nginx-errors-ptbr/errors/409.html;
error_page 410 /nginx-errors-ptbr/errors/410.html;
error_page 411 /nginx-errors-ptbr/errors/411.html;
error_page 412 /nginx-errors-ptbr/errors/412.html;
error_page 413 /nginx-errors-ptbr/errors/413.html;
error_page 414 /nginx-errors-ptbr/errors/414.html;
error_page 415 /nginx-errors-ptbr/errors/415.html;
error_page 416 /nginx-errors-ptbr/errors/416.html;
error_page 417 /nginx-errors-ptbr/errors/417.html;
error_page 418 /nginx-errors-ptbr/errors/418.html;
error_page 421 /nginx-errors-ptbr/errors/421.html;
error_page 422 /nginx-errors-ptbr/errors/422.html;
error_page 423 /nginx-errors-ptbr/errors/423.html;
error_page 424 /nginx-errors-ptbr/errors/424.html;
error_page 425 /nginx-errors-ptbr/errors/425.html;
error_page 426 /nginx-errors-ptbr/errors/426.html;
error_page 428 /nginx-errors-ptbr/errors/428.html;
error_page 429 /nginx-errors-ptbr/errors/429.html;
error_page 431 /nginx-errors-ptbr/errors/431.html;
error_page 451 /nginx-errors-ptbr/errors/451.html;
error_page 500 /nginx-errors-ptbr/errors/500.html;
error_page 501 /nginx-errors-ptbr/errors/501.html;
error_page 502 /nginx-errors-ptbr/errors/502.html;
error_page 503 /nginx-errors-ptbr/errors/503.html;
error_page 504 /nginx-errors-ptbr/errors/504.html;
error_page 505 /nginx-errors-ptbr/errors/505.html;
error_page 506 /nginx-errors-ptbr/errors/506.html;
error_page 507 /nginx-errors-ptbr/errors/507.html;
error_page 508 /nginx-errors-ptbr/errors/508.html;
error_page 510 /nginx-errors-ptbr/errors/510.html;
error_page 511 /nginx-errors-ptbr/errors/511.html;
location ^~ /nginx-errors-ptbr/errors/ {
ssi on;
internal;
root /usr/share/nginx/html;
allow all;
}
location ^~ /assets/css/style.css {
root /usr/share/nginx/html/nginx-errors-ptbr/errors;
allow all;
}
location ~* montserrat-(400|700).(eot|woff2|woff|ttf|svg) {
root /usr/share/nginx/html/nginx-errors-ptbr/errors;
allow all;
}
# Por padrão o erro 403 bloqueia o acesso a páginas para usuarios não autorizados. Devido a isto, a página personalizada
# para este erro também é bloqueada e a página padrão do Nginx é mostrada. Para contornar este problema o parametro "allow all" é adicionado.
# Ele permite que a página html, codigo css e fontes utilizadas sejam carregados na página mostrada para o usuário.
# Por padrão outras páginas de erro não precisam usar "allow all" por já serem liberadas, utilizar este parametro para outras
# páginas não parece afetar alguma coisa relacionado a segurança ou usabilidade.