By montone
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!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.