Files
MeowIndex/docs/nginx.conf
T
2023-02-11 17:06:05 -05:00

24 lines
668 B
Nginx Configuration File

# The MeowIndex web app block
location /__meowindex__ {
alias /etc/nginx/MeowIndex/dist;
# Use sub_filter to configure the app
sub_filter_types application/javascript;
sub_filter_once off;
sub_filter "{DEPLOY-PATH-PLACEHOLDER}" "/__meowindex__";
sub_filter "{HOST-PLACEHOLDER}" "/api";
sub_filter "\"/assets" "\"/__meowindex__/assets";
# Serve index.html on other 404 paths as well
try_files $uri /__meowindex__/index.html;
}
# The api block
location /api {
rewrite ^/api(/.*)$ $1 break;
index DISABLE_INDEX_HTML_AUTO_MATCHING;
autoindex on;
autoindex_format json;
add_header Access-Control-Allow-Origin *;
}