- markdown: new directives `:::figure assets/x.png | Подпись` and `:::video assets/x.mp4 | Подпись` rendered as figure/figcaption and a video player (works with HTML escaping on); sanitizer allows video/source/ track/figure with safe attributes only - assets: video extensions (mp4/webm/ogg) allowed, separate limits — images up to 10 MB, video up to 100 MB; correct content types - upload limits raised: web/academic multipart 120 MB per file / 200 MB per request, nginx client_max_body_size 200m (covers media inside ZIP imports) - docs: new docs/06-authoring.md (markdown, images, video, assets, limits, import semantics); import message now says "медиафайлов"
68 lines
2.6 KiB
Plaintext
68 lines
2.6 KiB
Plaintext
# Nginx для LMS на сервере lms.our-place.ru.
|
||
#
|
||
# Схема:
|
||
# интернет -> nginx (80/443) -> 127.0.0.1:8090 (контейнер web)
|
||
#
|
||
# Установка (Debian/Ubuntu):
|
||
# sudo cp deploy/nginx/lms.our-place.ru.conf /etc/nginx/sites-available/lms.our-place.ru.conf
|
||
# sudo ln -sf /etc/nginx/sites-available/lms.our-place.ru.conf /etc/nginx/sites-enabled/lms.our-place.ru.conf
|
||
# sudo nginx -t && sudo systemctl reload nginx
|
||
# sudo certbot --nginx -d lms.our-place.ru # добавит TLS автоматически
|
||
#
|
||
# Ниже — HTTP-версия, достаточная и для первичного выпуска сертификата,
|
||
# и для работы без TLS. После `certbot --nginx` блок server 443 появится сам.
|
||
|
||
server {
|
||
listen 80;
|
||
listen [::]:80;
|
||
server_name lms.our-place.ru;
|
||
|
||
# ACME-челлендж Let's Encrypt.
|
||
location /.well-known/acme-challenge/ {
|
||
root /var/www/certbot;
|
||
}
|
||
|
||
# Большие загрузки: ZIP лаб, решения, материалы.
|
||
client_max_body_size 200m; # крупные ZIP с изображениями и видео
|
||
|
||
location / {
|
||
proxy_pass http://127.0.0.1:8090;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
proxy_set_header X-Real-IP $remote_addr;
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
proxy_set_header X-Forwarded-Proto $scheme;
|
||
proxy_set_header X-Forwarded-Host $host;
|
||
|
||
# Загрузка файлов может быть долгой.
|
||
proxy_read_timeout 300s;
|
||
proxy_send_timeout 300s;
|
||
proxy_connect_timeout 30s;
|
||
}
|
||
}
|
||
|
||
# --- Если TLS настраивается вручную (без certbot --nginx) ---
|
||
# server {
|
||
# listen 443 ssl;
|
||
# listen [::]:443 ssl;
|
||
# http2 on;
|
||
# server_name lms.our-place.ru;
|
||
#
|
||
# ssl_certificate /etc/letsencrypt/live/lms.our-place.ru/fullchain.pem;
|
||
# ssl_certificate_key /etc/letsencrypt/live/lms.our-place.ru/privkey.pem;
|
||
# ssl_protocols TLSv1.2 TLSv1.3;
|
||
#
|
||
# client_max_body_size 200m; # крупные ZIP с изображениями и видео
|
||
#
|
||
# location / {
|
||
# proxy_pass http://127.0.0.1:8090;
|
||
# proxy_http_version 1.1;
|
||
# proxy_set_header Host $host;
|
||
# proxy_set_header X-Real-IP $remote_addr;
|
||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||
# proxy_read_timeout 300s;
|
||
# proxy_send_timeout 300s;
|
||
# }
|
||
# }
|