DEV Community

Jabir
Jabir

Posted on

How to Start/ Run Angular application with pm2 in aws ec2

I have configuration in directory /etc/nginx/conf.d

server {
listen 80;
root /var/www/html/owner/dist/browser;
server_name stagingapp.company.com;

location / {
proxy_pass http://127.0.0.1:8002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}

I Built the app from my local system and pushed to Git. Then pulled the same from Ec2 Server from app directory. Now I want to run the application. Do we have any command for this with PM2.

Top comments (1)

Collapse
 
kuldipmori profile image
Mori Kuldip

why you are not use /etc/nginx/sites-available/*.conf
is there any reason you use are use your given path ?