skip to Main Content

enter image description here

I want to host my next.js website on cPanel but got this error..

It is working is a subdomain.

So how can i install node.js on public_html??

3

Answers


  1. Do not put your application under the public_html directory.
    The public_html directory is accessible to the public.
    Putting your application code there would be an unnecessary risk.

    The underlying software and configuration (Passenger) handle the mapping of the application to a publically accessible URL for you. There is zero need to place your application within the public_html folder. Instead, choose a directory named after your application or something similar.

    Also, it might be helpful to know that the Node.JS plugin that you’re making use of is created and provided by CloudLinux rather than cPanel:

    https://docs.cloudlinux.com/cloudlinux_os_components/#node-js-selector

    Login or Signup to reply.
  2. My solution change main domain to other then add again domain app to other folder

    Login or Signup to reply.
  3. JUST don’t put slash replace this ‘public_html/’ to ‘public_html’

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search