/etc/nginx/sites-available/myapp-httpp
currently is:
location / {
root /var/myapp/public;
index index.html;
error_page 404 = @backend;
}
should:
location / {
root /var/myapp/public;
index index.html;
error_page 404 = @backend;
error_page 403 = @backend;
}
otherwise it is not possible return something from node.js on the root (i.e.: http://www.myapp.com/) of the domain, as nginx (if the 'public' folder exists) needs to handle an HTTP 403 instead of an HTTP 404.