I have an Angular app which runs perfectly in my local and production environment.. After a tiny change I made, I ran the app locally and it works fine.. Then I built the pr
I also had the same problem a couple of times, I solved it this way:
Build the project with a user other than root (ubuntu - normaluser)
root$ chown -R ubuntu:ubuntu my-project-folder/
ubuntu$ cd my-project-folder/
ubuntu$ npm install
ubuntu$ ng build -xxx params xx etc
In production server show nginx user :
root$ grep -rh user /etc/nginx/*
user www-data; # in my case
Now move or replace my-project-folder
root$ mv my-project-folder/ /var/www/awesome.com
And change permissions to nginx user
root$ chown -R www-data:www-data /var/www/awesome.com
(Y)