Deploy node.js in cyberpanel

I got the answer from here: Proxy Preserve Host

Your application should be running in port, something like this 127.0.0.1:3000.

What you can do is to go to Websites > List of websites > Pick your website > Manage option. There you will find the vHost Conf section, there you should paste this:

extprocessor appname {
  type                    proxy
  address                 127.0.0.1:your_app_port (3000 for this example)
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}

And the last step would be pasting the following in the Rewrite rules section

RewriteEngine On
RewriteRule ^(.*)$ HTTP://appname/$1 [P]

Best of luck!

Share

Edit