0

I'm new in Nginx. What I'm trying to do is to pair it with my NodeJS backend server.

My Nginx resolves successfully only mydomain.com but not mydomain.com/some_path.

Here I try to access mydomain.com

enter image description here

And here mydomain.com/metadata

enter image description here

This is my Nginx default file (/etc/nginx/sites-available/default):

enter image description here

What am I doing wrong with it?

How to make Nginx redirect mydomain.com/some/random/path?with=some&query=asd to 127.0.0.1:4300/some/random/path?with=some&query=asd

Thank you in advance!

spatak
  • 1,039
  • 1
  • 14
  • 25

1 Answers1

0

The solution is very simple. I had to remove try_files $uri $uri/ =404.

Now everything works just fine!

spatak
  • 1,039
  • 1
  • 14
  • 25