forked from cakephp/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
45 lines (43 loc) · 1.25 KB
/
nginx.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
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.;
server_name _;
# Enable gzip
gzip on;
gzip_proxied any;
gzip_types text/plain text/xml text/css application/x-javascript;
gzip_vary on;
# Error handling
error_page 404 @error_page;
location @error_page {
root /var/www/html;
set $error404 /3.0/en/404.html;
if ($request_filename ~ "/3.0/es") {
set $error404 /3.0/es/404.html;
}
if ($request_filename ~ "/3.0/fr") {
set $error404 /3.0/fr/404.html;
}
if ($request_filename ~ "/3.0/ja") {
set $error404 /3.0/ja/404.html;
}
if ($request_filename ~ "/3.0/kr") {
set $error404 /3.0/kr/404.html;
}
if ($request_filename ~ "/3.0/pt") {
set $error404 /3.0/pt/404.html;
}
if ($request_filename ~ "/3.0/tr") {
set $error404 /3.0/tr/404.html;
}
if ($request_filename ~ "/3.0/zh") {
set $error404 /3.0/zh/404.html;
}
if ($request_filename ~ "/3.0/ru") {
set $error404 /3.0/ru/404.html;
}
rewrite ^(.*)$ $error404 break;
}
}