-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnginx.conf
More file actions
42 lines (35 loc) · 939 Bytes
/
nginx.conf
File metadata and controls
42 lines (35 loc) · 939 Bytes
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
server {
listen 80;
listen [::]:80;
server_name localhost;
absolute_redirect off;
location /documentation/ru {
alias /opt/ru/;
index index.html;
if ($request_uri ~ ^/(.*).html$) {
error_page 404 /404_ru.html;
}
if ($request_uri = /documentation/ru/index.html) {
return 302 /documentation/ru/;
}
}
location /documentation/en {
alias /opt/en/;
index index.html;
if ($request_uri ~ ^/(.*).html$) {
error_page 404 /404_en.html;
}
if ($request_uri = /documentation/en/index.html) {
return 302 /documentation/en/;
}
}
location = /404_en.html {
return 302 /documentation/en/;
}
location = /404_ru.html {
return 302 /documentation/ru/;
}
location ^~ /documentation {
return 302 /documentation/en/;
}
}