Welcome! Log In Create A New Profile

Advanced

Re: Nginx serving wrong site

Francis Daly
January 08, 2024 08:22AM
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 francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx serving wrong site

James Read January 08, 2024 08:12AM

Re: Nginx serving wrong site

Francis Daly January 08, 2024 08:22AM

Re: Nginx serving wrong site

James Read January 08, 2024 09:16AM

Re: Nginx serving wrong site

Francis Daly January 08, 2024 09:30AM

Re: Nginx serving wrong site

James Read January 08, 2024 09:50AM

Re: Nginx serving wrong site

Francis Daly January 08, 2024 10:04AM

Re: Nginx serving wrong site

James Read January 08, 2024 11:36AM

Re: Nginx serving wrong site

James Read January 08, 2024 11:50AM

Re: Nginx serving wrong site

Francis Daly January 09, 2024 04:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 136
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready