Skip to content
Snippets Groups Projects
Verified Commit 86c45908 authored by Dmytro Bogatov's avatar Dmytro Bogatov :two_hearts:
Browse files

Add proper status codes.

parent 59313abc
No related branches found
No related tags found
No related merge requests found
Pipeline #2475 passed
index.html index.html
nginx.conf
server {
server_name _;
error_page 404 /index.html;
# Everything is a 404
location / {
return 404; #return the code 404
}
location = /healthz {
return 200;
}
# link the code to the file
location = /index.html {
root /srv/;
}
}
server {
server_name _;
error_page 503 /index.html;
# Everything is a 404
location / {
return 503; #return the code 404
}
# link the code to the file
location = /index.html {
root /srv/;
}
}
...@@ -11,6 +11,7 @@ do ...@@ -11,6 +11,7 @@ do
rm -f ./index.html rm -f ./index.html
cp $site ./index.html cp $site ./index.html
cp ./configs/$IMAGE.conf ./nginx.conf
docker build -t registry.dbogatov.org/dbogatov/nginx-placeholders/$IMAGE . docker build -t registry.dbogatov.org/dbogatov/nginx-placeholders/$IMAGE .
......
server {
server_name _;
root /srv;
index index.html;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment