---
title: How to View Errors on a Python/NodeJS App in cPanel
description: Sometimes, after deploying your Python/NodeJS app in cPanel, you may get an error 500. Unfortunately, error 500 does not tell you much about whats affecting your site. This is a generic error message. You can however view the actual error…
url: "https://truehost.com/support/knowledge-base/how-to-view-errors-on-a-python-nodejs-app-in-cpanel/"
updated: "2024-06-07"
---

# How to View Errors on a Python/NodeJS App in cPanel

Sometimes, after deploying your Python/NodeJS app in cPanel, you may get an error 500. Unfortunately, error 500 does not tell you much about whats affecting your site. This is a generic error message.

You can however view the actual error behind this cryptic error 500 from your cPanel.

There are two ways to do this:

- Use error log created by your app
- Enable error display on the site via .htaccess

## Use error log created by your app

1.Login to your cPanel and go to File Manager

![](https://truehost.com/support/wp-content/uploads/2022/10/Screenshot-2022-10-11-at-09-00-15-cPanel-Main-1024x189.png)

2.Navigate to the folder where your python files are.

3.Look for a file called stderr.log

![](https://truehost.com/support/wp-content/uploads/2022/10/Screenshot-2022-10-11-at-09-02-41-cPanel-File-Manager-v3.png)

4.Open the file and view the Errors displayed. In my example, I got a ModuleErrorLog due to some missing modules in my app

![](https://truehost.com/support/wp-content/uploads/2022/10/Screenshot-2022-10-11-at-09-05-10-stderr.log-cPanel-File-Manager-v3.png)

## Enable error display on the site via .htaccess

To enable errors, follow these steps:

1.Login to cPanel and go to File Manager

2.Open your document root and find the .htaccess file.

Note: For the main domain in cPanel, document root is usually public_html. Addons and subdomains may have different document roots. By default though, the document root of an Addon Domain is a folder whose name is the same as the addon domain. Same applies for sub domains

![](https://truehost.com/support/wp-content/uploads/2022/10/Screenshot-2022-10-11-at-09-16-17-cPanel-File-Manager-v3-1024x194.png)

3.Open the .htaccess file and add the following line

```
PassengerAppEnv "development"
```

![](https://truehost.com/support/wp-content/uploads/2022/10/Screenshot-2022-10-11-at-09-19-56-htaccess-cPanel-File-Manager-v3-1024x267.png)

4. Save the changes and restart your Python/NodeJS App

![](https://truehost.com/support/wp-content/uploads/2022/10/Screenshot-from-2022-10-11-09-22-18-1024x176.png)

5. When you access your site, detailed pages like the one below will be displayed. From the errors displayed, you can fix the app

![](https://truehost.com/support/wp-content/uploads/2022/10/error_message_flask-1.png)
