Question

Why I'm getting 500 internal server error with Insomnia

Posted October 6, 2020 1.4k views
NginxNode.js

I’m trying to access my api that is running with nginx and pm2 on Insomnia (Postman like…). Accessing from browser it seems to be ok, just got some “Token not provided”, what I think is natural.

Let me know if I need to pass more info please.

This is my nginx config file:

server {
        listen 80 default_server;
        server_name localhost;

        location / {
                proxy_pass http://localhost:3333;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_set_header Host $proxy_host;
                proxy_cache_bypass $http_upgrade;
        }


}

Cheers!

edited by MattIPv4

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @montone,

Everything provided seems fine. Having said that, the best solution in such cases where you experience a server error is to check your error_log.

Check your Nginx’s error_log to see what exactly is causing these issues. Once you have it, it should be easier to solve the problem you are experiencing since you’ll know what to fix.

Regards,
KFSys