diff --git a/Dockerfile b/Dockerfile index 966fdaf8b..35afa7850 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,3 @@ FROM nginx:alpine +COPY nginx.conf /etc/nginx/conf.d/default.conf COPY public/ /usr/share/nginx/html/ diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 000000000..7223c76eb --- /dev/null +++ b/nginx.conf @@ -0,0 +1,28 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + + location ~ /([A-Za-z0-9_-]+)(/[A-Za-z0-9_.-]+)*$ { + if ($args = "go-get=1") { + return 200 '\n\t\n\t\n\n'; + + } + } + } + + + #error_page 404 /404.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; + } + +}