Wrong content served

Francis Daly francis at daoine.org
Tue Dec 26 23:59:22 UTC 2023


On Tue, Dec 26, 2023 at 07:57:41PM -0300, Daniel A. Rodriguez wrote:

Hi there,

> This behavior is driving me crazy. Currently have more than 30 sites behind
> this reverse proxy, but the latest is refusing to work.

Can you provide more details?

> Config is simple and pretty similar between them all.

"include" means "anything in that file is effectively in this
config". Nobody but you knows what is in that file.

> server {
>     listen 80;
>     server_name material.av.domain;
> 
>     include /etc/nginx/snippets/location-letsencrypt.conf;
> 
> #    return 301 https://$server_name$request_uri;
> 
> }

Your test request is:

$ curl -i http://material.av.domain/

What response do you get? What response do you want to get instead?

The "return" is commented out, so unless there is something surprising
in the location-letsencrypt.conf file, I would expect a http 200 response
with the content of "the default" index.html file.

> If I point the browser to material.av.domain got redirected to another
> sub-domain, among the 30 mentioned before. However, everything else works
> just fine.

Can you show the response to the "curl" request, to see whether "redirect"
is a http 301 from the web server, or is something like a http 200 from
the web server with maybe some javascript content that redirects to
"the wrong" place?

Cheers,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list