I literally copied a working configuration. The only changes I made were the name of the server and the root to find the files to be served.
On Mon, 8 Jan 2024, 08:20 Francis Daly, <fran...@daoine.org> wrote: > On Mon, Jan 08, 2024 at 08:11:21AM -0500, James Read wrote: > > Hi there, > > > My nginx server is serving the wrong site. I found this explanation > online > > > https://www.computerworld.com/article/2987967/why-your-nginx-server-is-responding-with-content-from-the-wrong-site.html > > However this explanation doesn't seem to fit my case as I have a location > > which nginx should match correctly. Is there any other reason why nginx > > would serve the wrong site? > > It pretty much always is because what you think you have told nginx to > do is not what you have actually told nginx to do. > > (The other occasions are usually when your browser is not talking to the > nginx that you think it is talking to.) > > To a first approximation: when a request comes to nginx, it first chooses > which server{} to handle the request in, then chooses which location{} > within that server{} to handle the request in. > > Can you show a configuration and a request that is handled in a different > location{} from what you want? > > Thanks, > > f > -- > Francis Daly fran...@daoine.org > _______________________________________________ > nginx mailing list > nginx@nginx.org > https://mailman.nginx.org/mailman/listinfo/nginx >
_______________________________________________ nginx mailing list nginx@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx