mirror of https://github.com/rancher/docs.git
24 lines
481 B
Nginx Configuration File
24 lines
481 B
Nginx Configuration File
map_hash_bucket_size 256;
|
|
map $request_uri $redirect_uri {
|
|
~^/docs/rancher/v2.0(/?.*)$ /docs/rancher/v2.x$1;
|
|
~^/docs/rke/v0.1.x(/?.*)$ /docs/rke/latest$1;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
absolute_redirect off;
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
index index.html index.htm;
|
|
}
|
|
|
|
error_page 404 /404.html;
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
|
if ( $redirect_uri ) {
|
|
return 302 $redirect_uri;
|
|
}
|
|
}
|