• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Question How to setup a custom error page for my Node.JS App?

P

Plesktrum

Guest
Hello Community,

How can I change the default node.js error page ("can't get /url") from server side? The /error_docs folder is filled.
I tried everything I could think of:
-activate/disable nginx proxy option
-setting
NGINX:
proxy_intercept_errors on;
in the additional nginx settings
-explicitly setting error document for nginx and apache
-using nodejs handler to return an error -
Code:
app.get('*', (req, res) => res.status(404).send(null))
(that only returned the Chrome error page)

There's no doubt in my mind that I'm not the only one powering a Node.JS website including custom error documents on Plesk :)
How to do what I wanted?

Best Regards
Plesktrum
 
Back
Top