title: angular SSR deployment in Cpanel
body: <p>I'm trying to deploy an angular universal project on Cpanel I uploaded the file and installed it </p>
  
  <p>in subdirectory public_html/aqar_front i added htaccess in public_html with the following code </p>
  
  <pre><code>DirectoryIndex disabled
  RewriteEngine On
  RewriteRule ^$ http://127.0.0.1:4000/ [P,L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ http://127.0.0.1:4000/$1 [P,L]
  </code></pre>
  
  <p>then I run this command </p>
  
  <pre><code>npm run serve:ssr 
  </code></pre>
  
  <p>it's working fine in the browser </p>
  
  <p><a href="https://i.stack.imgur.com/1brBu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1brBu.png" alt="enter image description here"></a></p>
  
  <p>but as you know when I closed the terminal the application stopped so I used pm2 to keep it running but it's not working in the browser 
  <a href="https://i.stack.imgur.com/GeLLX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GeLLX.png" alt="enter image description here"></a></p>
  
  <p>I used this command </p>
  
  <pre><code>pm2 start  dist/server.js  -- --port 4000
  </code></pre>
  
  <p>but it's doesn't work from browser any help, please 
  here is my angular and node js version</p>
  
  <blockquote>
    <p>Angular CLI: 8.3.4
    Node: 12.13.1
    OS: linux x64
    Angular: 8.2.6</p>
  </blockquote>