Monday, 5 June 2017

AngularJS production build

I have an AngularJS project deployed on a remote server. I have no problems installing the necessary modules, running 'npm install' and running the application locally using 'ng server' or remotely using 'ng build --prod'. In my angular application I am able to click links and get forwarded to the appropriate link, for example when I click on login I get redirected to 'myhost.com/login', BUT when I try to refresh the page or open directly the login page by visiting 'myhost.com/login' I get the following error "No input file specified. 54.175.4.110".

I've checked the error logs of the nginx and I found that,

2017/06/05 09:50:51 [error] 16085#16085: *49 FastCGI sent in stderr: "Unable to open primary script: /home/forge/default/current/dist/index.php (No such file or directory)" while reading response header from upstream, client: 41.128.168.145, server: default, request: "GET /login HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-fpm.sock:", host: "54.175.4.110" 2017/06/05 09:53:56 [error] 16085#16085: *56 FastCGI sent in stderr: "Unable to open primary script: /home/forge/default/current/dist/index.php (No such file or directory)" while reading response header from upstream, client: 41.128.168.145, server: default, request: "GET /login HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-fpm.sock:", host: "54.175.4.110"



via user2280167

No comments:

Post a Comment