38 lines
1.1 KiB
Nginx Configuration File
38 lines
1.1 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
charset utf-8;
|
|
|
|
# Correct MIME types — critical for Articulate Storyline .js bundles
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
# Protect Modul 6 with password
|
|
location ~* ^/Trainings/WBT_ErkW_6_Administration_erw_Funktionen(_Internet)?/ {
|
|
auth_basic "Administration Area";
|
|
auth_basic_user_file /etc/nginx/.htpasswd;
|
|
try_files $uri $uri/ =404;
|
|
|
|
# Cache static assets inside the protected directory
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|svg|woff|woff2|ttf|mp3|mp4)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|
|
|
|
# Cache static assets aggressively (course files never change after deploy)
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|svg|woff|woff2|ttf|mp3|mp4)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|