• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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