Ispmanager 6 lite, pro, host documentation

How to add Node.js projects in the panel

To add a Node.js project, follow these steps:

  1. Install Node.js
  2. Add permissions to a user
  3. Create a site for a project with Node.js
  4. Add a Node.js project
  5. Functional check

Install Node.js

To work with projects on Node.js install it in the panel:

  1. In the Main menu select Settings.
  2. From the drop-down menu select Software configuration.
  3. Select Node.js in the form that opens and click Install.

Add permissions to a user

After Node.js is installed in the panel, add usage rights to the user under whom Node.js projects will be added, to do this:

  1. In the Main menu select Users.
  2. Select the appropriate user and click on Edit.
  3. On the form that opens, find the Access section.
  4. Enable the Node.js checkbox and click Save.
  5. After saving, the Node.js icon will be displayed in the Status column of the user.

Create a site for a project with Node.js

Now you need to create a site with a Node.js handler, to do this:

  1. In the Main menu select Sites.
  2. On the form that opens, click on Create website.
  3. Select the Extended settings tab (for a detailed description of the settings, see Add a website) and fill in the required fields. Below are the important fields when creating a site with a Node.js project:
    • Main settings section:
      • Domain name – the domain name;
      • Website directory– the path to the website directory that is relative to the owner's home directory;
      • Website aliases – additional names of your site (optional field);
      • Handler – select Node.js;
      • SSL certificate – select an SSL certificate that will be used for this website. You can specify the existing certificate or create a new self-signed certificate;
      • IP-address – the list of IP addresses assigned to the website;
      • Website owner – select the website owner;
      • Default website (checkbox) – if the website is marked as default, it will process a request by the domain name which is not registered on this webserver (including requests by IP) to any IP address assigned to this website;
    • Handler section (Node.js):
      • Node.js version – select the required Node.js version;
      • Connection method:
        • Port free unprivileged port will be assigned to the website;
        • Socket file – the website will work via a socket.
  4. Click on Create.

On the Sites page, the created website will be added with the Node.js icon in the Parameters column.

Add a Node.js project

Add your Node.js project to the created site by doing the following:

  1. In the Main menu select Sites.
  2. Select the required site and click on the Website files button.
  3. On the File Manager form that opens, click Upload.
  4. Select where you want to upload the files from:
    • Local computer file – click on Choose file or move the necessary files to the drag-and-drop area;
    • File URL on remote server:
      • URL – a link to the file to be uploaded, for example, http://example.com/dir/file.html;
      • Имя файла – the name of the file to be saved with in the current directory. If you leave this field blank, the file name will be extracted from the URL.
  5. Make sure package.json и server.js contain the correct values for your project.
  6. Click on Back to the list of websites arrow.
  7. Click on ““ and select Npm install.
    Npm install will install all the specified packages of your project. The installation process is indicated by a blinking Node.js icon in the Parameters column.
  8. After installation is complete, click on the ““ button and select Restart (Node.js).
    The project will be restarted; the Node.js icon will turn green, which means the project is working properly.

Functional check

To check if it works:

  • If the Unix family OS is installed on the PC, add the following entry to the /etc/hosts file:
    1.1.1.1 example.com
    where:
    • 1.1.1.1 — is the IP-address of your server;
    • example.com — the website name;
  • If Windows OS is installed on the PC, add the following entry to the C:\windows\system32\drivers\etc\hosts file:
    1.1.1.1 example.com
    where:
    • 1.1.1.1 — the IP-address of your server;
    • example.com — your website name.

Enter the name of the website in your browser to check if it was created correctly.