skip to Main Content

I have setu server side rendering in my angular app using nguniversal and it is working fine in my local where I can serve the files using

npm run serve:ssr

which will run the following command

node dist/moviesplay/server/main.js

How can I implement this in my remote server with plesk?

I tried using the plesk nodejs extension and set the application root and startup file as follows

Document Root /httpdocs/angular/dist/moviesplay/server    
Application Mode production  
Application URL ********
Application Root /httpdocs/angular/dist/moviesplay/server   open  
Application Startup File main.js   

screenshot

2

Answers


  1. you need to change the Document Root folders

    Document Root /httpdocs/angular
    Application Mode production  
    Application URL ********
    Application Root /httpdocs/angular 
    Application Startup File dist/server/main.js
    
    Login or Signup to reply.
  2. I had the same problem. The document root folder which is the angular files must be inside application root folder.

    Basically the server folder must be the parent directory of UI folder

    It worked for me.

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