pass all non-api paths to react app

This commit is contained in:
Collin M. Barrett 2019-09-02 16:39:15 -05:00
parent 73f451e604
commit 8bc1d79ab3
2 changed files with 15 additions and 16 deletions

View file

@ -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

View file

@ -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;
}
}