30 lines
1.0 KiB
Plaintext
30 lines
1.0 KiB
Plaintext
# pipi-assets 本地测试(端口 8081,避免与 80 端口其他站点冲突)
|
|
# 使用方式见同目录下的 NGINX-本地测试说明.md
|
|
|
|
server {
|
|
listen 8081;
|
|
server_name localhost;
|
|
|
|
root /Users/joey-xd/sites/pipi-learn/platform-pipi/packages/voice-production/pipi-assets;
|
|
autoindex off;
|
|
|
|
location /voice/ {
|
|
alias /Users/joey-xd/sites/pipi-learn/platform-pipi/packages/voice-production/pipi-assets/voice/;
|
|
add_header Cache-Control "public, max-age=86400";
|
|
}
|
|
location /char/ {
|
|
alias /Users/joey-xd/sites/pipi-learn/platform-pipi/packages/voice-production/pipi-assets/char/;
|
|
add_header Cache-Control "public, max-age=3600";
|
|
add_header Access-Control-Allow-Origin "*";
|
|
}
|
|
location /image/ {
|
|
alias /Users/joey-xd/sites/pipi-learn/platform-pipi/packages/voice-production/pipi-assets/image/;
|
|
add_header Cache-Control "public, max-age=86400";
|
|
}
|
|
|
|
location /health {
|
|
return 200 "ok";
|
|
add_header Content-Type text/plain;
|
|
}
|
|
}
|