Nodejs app not running on apache virtualmin

OS type and version Ubuntu 20
Virtualmin version latest

I am trying to run my Directus App which is a Nodejs app on my Apache server on Ubuntu 20. I followed some most common tutorials and started pm2 with my app name imt which is running on port 8056. I am getting 500 internal server error.

Here is my apache conf code :

ProxyRequests Off
   ProxyPreserveHost On
   ProxyVia Full
   <Proxy *>
      Require all granted

   <Location /api>
      ProxyPass https://localhost:8056
      ProxyPassReverse https://localhost:8056

Is this correct configuration ? 8056 is the port of my Directus App. What is wrong here ?


is the location of my app.

I have also set DocumentRoot /home/myusername/scripts/imt_project

All modules enabled

sudo a2enmod proxy
sudo a2enmod rewrite
sudo a2enmod proxy_http