diff --git a/Dockerfile b/Dockerfile index 26bad05..8e288b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM nginx:latest COPY src /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..8d0740d --- /dev/null +++ b/nginx.conf @@ -0,0 +1,14 @@ +server { + listen 80; + server_name localhost; + + location / { + try_files $uri $uri/ =404; + } + + error_page 404 = @empty404; + + location @empty404 { + return 404; + } +} \ No newline at end of file