Error 404 for every requests on the VPS, not on localhost - jhipster

I ve managed to install and run my Jhipster application on a Debian VPS. The homepage shows.
But when I'm trying to authenticate I m getting a :
/app/rest/account 404 (Not
Found)
As it works on my computer, I m trying to find out why it doesn't on the VPS.
Are there settings to do on the VPS?
Thanks in advance.

Related

How to find out why I get 500 error from Firebase on server but not on localhost

I try to run my first node application on my server from subdomain. It works perfectly on my PC but when I move it to the server, seems everything works, site loads with all js except Firebase.
I get the following errors in chrome:
/firebase/firestore net::ERR_ABORTED 500 (Internal Server Error)
/firebase/app net::ERR_ABORTED 500 (Internal Server Error)
The 2 lines of my my .js triggers the error:
import firebase from '/firebase/app';
import '/firebase/firestore';
Obviously it can mean millions different issues but I have no idea how to find any logs or anything what would tell me why this error triggered.
I tried to turn off/on https. I checked logs on server but found nothing just the same 500 error in access log. I tried but couldn't find any node specific log on the server. I tried to re-install firebase. After I tried to re-install node and everything and re-started from scratch.
I tried to copy the whole node_modules folder to the server from my PC but didn't help.
I would expect it to run just as on localhost or at least see some log about the error so I could fix it. The server is Linux VPS with plesk obsidian. The app is on a subdomain, the main domain has php website running.

Unable to fix NGINX 502: Bad Gateway error on a Digital Ocean droplet - Ubuntu 20.04

I have deployed my website to a Digital Ocean droplet (Ubuntu 20.04 server).
Everything was working fine. Today, I did some changes to the website in my local machine. So I pushed the changes to GitHub and then cloned the GitHub repo again to the server. Then, I installed the dependencies and restarted PM2.
Now, when I visit my site https://sundaray.io, I get the following error.
The following is the error log.
How can I fix the error?
Simple meaning is
No HTTP server response, your Node Http server is not answering requests.
502 gateway mean server and Nginx is getting your request but there is issue with upstream.
you can use the command to show the logs of pm2
pm2 show
the application might be crashing or internal server 500 error.

The Nginx server returns error 502 for some directories (Express Application)

I'm running an express application using nginx web server on Ubuntu. everything works fine but today when I added two more directories using app.get method and re-deploy my app, the new directories won't work and it returns 502 Bad Gateway errors (old directoriesn are working fine). Restarting pm2, nginx and the server itself didn't help. What should I do?
After a couple of hours I realized that the problem was in my code and not relevant to nginx. But because of pm2 the server would not crash to help me find that out.
running normal run command:
node server.js
revealed the mistake

Unable to redirect the URL to another page in docker app

Summarize of my problem:
I have create a website using MERN stack and deployed to AWS using docker.
when I refresh the domain page i.e http://discussion.sramanujan.com/ ,it works fine.
When I directly try to access the discussion url http://discussion.sramanujan.com/discussion , I get "Failed to load resource: the server responded with a status of 500 (Internal Server Error)"
Steps to repro the issue:
lauch the website http://discussion.sramanujan.com/
Refresh the browser [website should reload successfully]
Click on discussion button. [website url will change to http://discussion.sramanujan.com/discussion ]
Refresh the page.
Expected:
Page should load discussion page on refresh
Actual:
Got an error message as "Failed to load resource: the server responded with a status of 500 (Internal Server Error)".
Any idea as how to handle this issue?
More information:
1.host server port 80 is mapped to docker container port 3000.
2.Navigation through website is working fine.
/usr/src/api is my WORKDIR
Logs from server:(on refresh I get error 500)
you are also getting a 304 (Not modified) error on your website, try to enable javaScript, after that it should work

Website on Ajenti V with Node.JS content always throw 404

I install AjentiV to manage my website. Now I have an webapp on NodeJS and want to use with AjentiV. I follow a simple tutorial Setting up a Node.js website with Ajenti V (Keystone example) .
I config the Content of website to Node.JS, provide the script and config port 8080. I use port 8080 for the Node app, there are no error but I try the webapp always throw 404 - Not found result, in both port 80 and 8080.
Has anyone met this problem before? How can I make it works?
Thank you in advance! :)
Sorry, my bad. There is no problem with AjentiV and Node.JS content. The problem itself is the our webapp always throw 404 due to my fault config.

Resources