Rust takes forever to build. Im sure I could do alot better deploying the application. But who knows, maybe im doing great at deploying my [comment board](https://unorthodoxdev. net/comment) but what if there is some bug that I introduced that crashes the server 👻. What if while the server is crashed, Im at work??? Well good thing we can customize the default 504 page that nginx uses. So lets get started.
First we will go to our /var/www/html
folder and create a page called maintenance.html
. Inside of maintenance I have put the following.
|
|
Simple and sweet right? next, we have to edit our nginx default config. You can find that at /etc/nginx/sites-available/default
.
Remember! You must edit this files as sudo!
Inside of our config file, just below your ssl certificates (or your port 80 config. Who knows maybe your rocking http naked). paste the following
|
|
Next, you will need to restart your nginx server. You can do so via the following command
|
|
Now, kill your service, and run to the url to try to capture the error.