I tried setting up a custom 404 page by adjusting the nginx.conf file, adding “error_page 404 /404.html;”. Everything worked fine until the bot changed it back to its default / removed it. I was now wondering if there is a way to avoid this?
It doesn’t work and is potentially harmful. The file will be world readable to everyone because nginx will serve the file as a text file, so anything in there is exposed. Also, it doesn’t change the configuration. That is really a terrible issue response.
I see. I misunderstood the second sentence the issue response. That is why I type out the directory locations, as it is the difference between a working config and a dangerous world-readable configuration file.
I was trying this out, but I am unsure if it still works?
I created the my.domain.tld.conf with the error_page parameters file in the /home/user-data/www/my.domain.tld directory, ran /home/mailuser/mailinabox/tools/web_update, did nginx -t and did systemctl restart nginx.