cloudflare/ClickHouse
Publicmirrored fromhttps://github.com/cloudflare/ClickHouse
website/nginx/default.conf
31lines · modecode
unknown
| 1 | server { |
| 2 | listen 80 default; |
| 3 | listen [::]:80 default ipv6only=on; |
| 4 | server_name localhost clickhouse.yandex test.clickhouse.yandex; |
| 5 | |
| 6 | root /usr/share/nginx/html; |
| 7 | index index.html index.htm; |
| 8 | |
| 9 | error_page 404 /404.html; |
| 10 | error_page 500 502 503 504 /50x.html; |
| 11 | |
| 12 | location = /50x.html { |
| 13 | root /usr/share/nginx/www; |
| 14 | } |
| 15 | |
| 16 | rewrite ^/docs/$ https://clickhouse.yandex/docs/en/ permanent; |
| 17 | rewrite ^/reference_en.html$ https://clickhouse.yandex/docs/en/single/ permanent; |
| 18 | rewrite ^/reference_ru.html$ https://clickhouse.yandex/docs/ru/single/ permanent; |
| 19 | rewrite ^/presentations/(.*)$ https://clickhouse.github.io/clickhouse-presentations/$1 permanent; |
| 20 | |
| 21 | include /usr/share/nginx/html/docs/redirects.conf; |
| 22 | |
| 23 | if ( $uri !~ .*/index.html ){ |
| 24 | rewrite ^/docs/(.*)/(.+)\.html$ /docs/$1/$2/ permanent; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | server { |
| 29 | server_name clickhouse.yandex.ru clickhouse.yandex.com; |
| 30 | return 301 https://clickhouse.yandex$request_uri; |
| 31 | } |