fix: Always redirect to landing page on 404
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
321742632c
commit
4ef8e110cd
12
Dockerfile
12
Dockerfile
|
@ -13,15 +13,19 @@ RUN sed -i -r \
|
|||
|
||||
RUN echo $'\
|
||||
server {\
|
||||
listen 80;\
|
||||
listen [::]:80;\
|
||||
server_name localhost;\
|
||||
listen 80;\
|
||||
listen [::]:80;\
|
||||
server_name _;\
|
||||
root /var/www/html;\
|
||||
try_files /index.html =404;\
|
||||
try_files $uri $uri/index.html @redirect;\
|
||||
\
|
||||
location ~ ^/(favicon.ico|robots.txt)$ {\
|
||||
access_log off;\
|
||||
}\
|
||||
\
|
||||
location @redirect {\
|
||||
return 301 $scheme://$http_host;\
|
||||
}\
|
||||
}\
|
||||
' >/etc/nginx/conf.d/default.conf
|
||||
|
||||
|
|
Loading…
Reference in a new issue