diff --git a/Dockerfile b/Dockerfile index acea170..348c00d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,8 @@ ARG NGINX_VERSION=1.27.1 FROM nginx:${NGINX_VERSION}-alpine +ENV LINK_PREFIX="" + COPY css /opt/litterlink/css COPY fonts /opt/litterlink/fonts COPY images /opt/litterlink/images diff --git a/templates/default.conf.template b/templates/default.conf.template index 0a972b7..f3fb22d 100644 --- a/templates/default.conf.template +++ b/templates/default.conf.template @@ -1,8 +1,8 @@ server { listen 80; - - location / { - root /opt/litterlink; - index index.html; + + location ~ ^$LINK_PREFIX/$ { + root /opt/litterlink/; + try_files /index.html =404; } }