Files
Olapka-ru/default.conf
T
2026-10-31 21:29:12 +03:00

58 lines
1.6 KiB
Plaintext

server {
listen 80;
server_name www.olapka.ru;
return 301 https://olapka.ru$request_uri;
}
server {
listen 80;
server_name olapka.ru;
root /usr/share/nginx/html;
index index.html;
# Отдельная страница ошибки 404
error_page 404 /404.html;
# Убираем .html из исходных запросов браузера
if ($request_uri ~ ^(/[^?]*)\.html(\?.*)?$) {
return 301 $1$is_args$args;
}
location / {
try_files $uri $uri.html $uri/ =404;
}
# Доступ только для внутренней обработки ошибки
location = /404.html {
internal;
}
# Machine-readable site summaries (UTF-8 Markdown in .txt files).
location ~ ^/llms(?:-full)?\.txt$ {
types { }
default_type text/plain;
charset utf-8;
add_header Cache-Control "public, max-age=3600";
try_files $uri =404;
}
# Keep the source legal page's noindex policy on its Markdown copy.
location = /legal.md {
types { }
default_type text/markdown;
charset utf-8;
add_header X-Robots-Tag "noindex, follow";
add_header Link '</llms.txt>; rel="describedby"';
try_files $uri =404;
}
location ~ ^/(index|services|personal-animation|business-animation|social-animation|portfolio|contacts)\.md$ {
types { }
default_type text/markdown;
charset utf-8;
add_header Cache-Control "public, max-age=3600";
add_header Link '</llms.txt>; rel="describedby"';
try_files $uri =404;
}
}