diff --git a/Dockerfile.review b/Dockerfile.review index 6743b610..a7d6f1d3 100755 --- a/Dockerfile.review +++ b/Dockerfile.review @@ -5,4 +5,4 @@ COPY app /app WORKDIR /app EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/build_branches.py b/build_branches.py index 4394bb47..5cca1b44 100755 --- a/build_branches.py +++ b/build_branches.py @@ -160,7 +160,7 @@ def update_nginx_config(pr_numbers, parsed_env): for pr_number in pr_numbers: location_block = f"""location /{pr_number} {{ alias /app/{pr_number}; - try_files $uri $uri/ /index.html; + try_files $uri $uri/ =404; error_page 404 /404.html; }} """ diff --git a/nginx.conf b/nginx.conf index 97cba0b7..5e69e667 100644 --- a/nginx.conf +++ b/nginx.conf @@ -15,10 +15,11 @@ http { listen 80; #REPLACE_APPS + location / { - alias /app/#environment/; + root /app/#environment; index index.html; - try_files $uri $uri/ /index.html; + try_files $uri $uri/ /404.html; error_page 404 /404.html; } }