diff --git a/src/FilterLists.Web/Dockerfile b/src/FilterLists.Web/Dockerfile index 38a0f74a5..0406abc2a 100644 --- a/src/FilterLists.Web/Dockerfile +++ b/src/FilterLists.Web/Dockerfile @@ -3,7 +3,7 @@ # init base FROM nginx:alpine as base -# COPY ./src/FilterLists.Web/nginx/conf.d /etc/nginx/conf.d +COPY ./src/FilterLists.Web/nginx/conf.d /etc/nginx/conf.d # init build FROM node:alpine as build diff --git a/src/FilterLists.Web/nginx/conf.d/default.conf b/src/FilterLists.Web/nginx/conf.d/default.conf index b4b2819e8..173de90d8 100644 --- a/src/FilterLists.Web/nginx/conf.d/default.conf +++ b/src/FilterLists.Web/nginx/conf.d/default.conf @@ -1,18 +1,17 @@ -# https://raw.githubusercontent.com/react-boilerplate/react-boilerplate/master/app/.nginx.conf - -## -# Put this file in /etc/nginx/conf.d folder and make sure -# you have a line 'include /etc/nginx/conf.d/*.conf;' -# in your main nginx configuration file -## - server { - listen 80; + listen 80; + server_name localhost; - # Always serve index.html for any request - location / { - # Set path - root /var/www/; - try_files $uri /index.html; - } + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri /index.html; + } + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } } \ No newline at end of file