21 lines
656 B
Plaintext
21 lines
656 B
Plaintext
# Nginx 配置示例,服务于当前目录
|
|
server {
|
|
listen 8888;
|
|
server_name localhost;
|
|
root /Users/rogee/Projects/self/video-player;
|
|
autoindex on;
|
|
# 支持 Range 请求(默认支持)
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
# 为 .aac 文件添加 location 匹配,强制返回 Content-Type 为 audio/aac
|
|
location ~* \.aac$ {
|
|
default_type "";
|
|
add_header Content-Type audio/aac;
|
|
try_files $uri =404;
|
|
}
|
|
# 可选:日志配置
|
|
access_log /Users/rogee/Projects/self/video-player/nginx_access.log;
|
|
error_log /Users/rogee/Projects/self/video-player/nginx_error.log;
|
|
}
|