Have had many hats on in my life: Developer, Team Lead, Scrum Master, Architect and Product Owner. Now back to developer \o/ Interested in product discovery, quality assurance and language design.
Have had many hats on in my life: Developer, Team Lead, Scrum Master, Architect and Product Owner. Now back to developer \o/ Interested in product discovery, quality assurance and language design.
Have had many hats on in my life: Developer, Team Lead, Scrum Master, Architect and Product Owner. Now back to developer \o/ Interested in product discovery, quality assurance and language design.
Oh, then you forgot to provide the correct port in the URL. What you posted uses the default port 80, so it uses the default nginx site. Use http://127.0.0.1:<you-port>/foo/bar
hello, Daniel thanks for this post.
However, I am having trouble passing all paths from a request to the server.
example:
servername = 127.0.0.1;
location / {
proxy_pass 192.168.4.22:3000/;
}
I want all requests with dynamic paths coming from e.g 127.0.0.1/ be matched to the above location and passed to the proxy.
I get a 404 from the server when my URL looks like 127.0.0.1/foo/bar but when its just 127.0.0.1, it works fine.
is there something i am not doing right?
Hey Peters,
was it just a formatting issue in the comment, or are you missing the // in http://127.0.0.1 in the proxy_pass statement?
Hi Daniel,
It's a formating issue.
Hm... looks correct, though. Maybe the error lies elsewhere?
Any idea where to look?
I have two sites enabled. The default nginx site running on port 80 and my API site running on a different port.
Oh, then you forgot to provide the correct port in the URL. What you posted uses the default port 80, so it uses the default nginx site. Use http://127.0.0.1:<you-port>/foo/bar
I actually have the correct port in the file. The one I posted here is just an example. The IP is different
Hi Daniel,
Here is how the site looks
i am thinking, could the root there be the problem?
I have removed it and it's still the same thing.
Hi again Daniel,
I have been able to solve it.
I had to comment this line in the location
Thanks for your time. It's really appreciated