<div><div dir="auto">Thank Francis, if you're right, it's a backend problem.</div></div><div dir="auto"><br></div><div><div dir="auto">we are solving.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El El jue, 6 de ago. de 2020 a la(s) 10:25, Francis Daly <<a href="mailto:francis@daoine.org">francis@daoine.org</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">On Thu, Aug 06, 2020 at 09:48:55AM -0600, Rick Gutierrez wrote:<br><br>> El jue., 6 ago. 2020 a las 6:29, Francis Daly (<<a href="mailto:francis@daoine.org" target="_blank">francis@daoine.org</a>>) escribió:<br><br><br><br>Hi there,<br><br><br><br>> > Can you see what the html-or-javascript that tells the browser where to<br><br>> > POST the request, says about where to POST the request?<br><br>> <br><br>> The country file, is a javascript, performs the task, only that url<br><br>> that calls is where the controller is, that verifies if it edits or<br><br>> saves, and the proxy reverse does not interpret it that way because it<br><br>> is only a folder address, not a file address per that's it send a 404.<br><br><br><br>As I understand it, your nginx conf says (basically)<br><br><br><br>  location / {<br><br>    proxy_pass <a href="http://backend29" rel="noreferrer" target="_blank">http://backend29</a>;<br><br>  }<br><br><br><br>so every request to nginx gets sent to the backend server. nginx does<br><br>not know or care about files or folders; it proxy_pass:es all requests.<br><br><br><br>So the 404 comes from the backend server, because the app causes the<br><br>browser to ask for /agregareditar and not for /pais/agregareditar.<br><br><br><br>> I am not a programmer, the country folder has several files.<br><br>> <br><br>> # Pais ls<br><br>> <br><br>> AgregarEditar.cshtml ListaPaises.cshtml<br><br>> <br><br>> Index.cshtml         Pais.txt<br><br>> <br><br>> <br><br>> ><br><br>> > > any ideas?<br><br>> ><br><br>> > Maybe something like "location = /pais { return 301 /pais/; }" in<br><br>> > your nginx config will help, if the upstream server should do that but<br><br>> > does not?<br><br>> <br><br>> a little slower here, this would have to go down to the first<br><br>> location, so what you tell me:<br><br>> <br><br>> location = /pais { return 301 /pais/; }"<br><br><br><br>My guess is that your browser's first request is for "/pais",<br><br>and that returns something from the backend that says "ask for<br><br>agregareditar". And the browser correctly resolves "/pais" +<br><br>"agregareditar" to "/agregareditar". But that is not what you want.<br><br><br><br>My guess is that if your browser's first request is for "/pais/" (with<br><br>a / at the end), then what is returned from the backend will be the<br><br>same; but now the browser will resolve "/pais/" + "agregareditar" to<br><br>"/pais/agregareditar", which (hopefully) is what you want.<br><br><br><br>If that does work -- if you start by asking for "/pais/" and everything<br><br>works as you want it to -- then you can tell nginx to intercept the first<br><br>request for "/pais", and tell the browser to instead ask for "/pais/". And<br><br>then things might work.<br><br><br><br>You can tell nginx to do that one-interception by putting<br><br><br><br>  location = /pais { return 301 /pais/; }<br><br><br><br>in the same file as your main config, just before the<br><br><br><br>  location / {<br><br><br><br>line that you showed.<br><br><br><br>If your application does *not* work when you start by requesting "/pais/",<br><br>then this change to nginx will not fix things for you.<br><br><br><br>Right now, I see no evidence of a problem in the nginx config; only in<br><br>the backend application.<br><br><br><br>Maybe some evidence will appear, if there is still a problem.<br><br><br><br>Good luck with it,<br><br><br><br>        f<br><br>-- <br><br>Francis Daly        <a href="mailto:francis@daoine.org" target="_blank">francis@daoine.org</a><br><br>_______________________________________________<br><br>nginx mailing list<br><br><a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br><br><a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br><br></blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">rickygm<br><br><a href="http://gnuforever.homelinux.com" target="_blank">http://gnuforever.homelinux.com</a></div>