<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 8 Jan 2024, 10:04 Francis Daly, <<a href="mailto:francis@daoine.org">francis@daoine.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Jan 08, 2024 at 09:49:23AM -0500, James Read wrote:<br>
> On Mon, 8 Jan 2024, 09:29 Francis Daly, <<a href="mailto:francis@daoine.org" target="_blank" rel="noreferrer">francis@daoine.org</a>> wrote:<br>
> > On Mon, Jan 08, 2024 at 09:13:38AM -0500, James Read wrote:<br>
<br>
Hi there,<br>
<br>
> > So I'm going to guess that your "server_name" line is of the<br>
> > form "<a href="http://www.example.com" rel="noreferrer noreferrer" target="_blank">www.example.com</a>"; and your browser is instead accessing<br>
> > <a href="http://example.com" rel="noreferrer noreferrer" target="_blank">http://example.com</a>; and nginx is returning the content of the<br>
> > default_server for that ip:port instead of this server.<br>
> <br>
> My server_name is of the form "<a href="http://example.com" rel="noreferrer noreferrer" target="_blank">example.com</a> <a href="http://www.example.com" rel="noreferrer noreferrer" target="_blank">www.example.com</a>;" so I don't<br>
> think that is the problem. Could this be anything to do with dns<br>
> configuration?<br>
<br>
Do your nginx logs indicate that the request is being handled by this<br>
nginx instance at all?<br>
<br>
If not, maybe DNS is not causing your browser to talk to this server's<br>
IP address.<br>
<br>The logs look fine. They are showing the requests. <br><br><br>
Do you have any "listen" directives that include specific IP addresses,<br>
instead of just ports? Does your <a href="http://example.com" rel="noreferrer noreferrer" target="_blank">example.com</a> resolve to the address<br>
of the "listen" in this "server{}"; or to the address of the "listen"<br>
in whichever "server{}" is actually being used; or to a different address?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><div dir="auto">server {</div><div dir="auto"> listen 80;</div><div dir="auto"> listen [::]:80;</div><div dir="auto"> </div><div dir="auto"> root /var/www/<a href="http://moshiim.it">moshiim.it</a>;</div><div dir="auto"> </div><div dir="auto"> index index.php index.html index.htm index.nginx-debian.html;</div><div dir="auto"> server_name <a href="http://example.com">example.com</a> <a href="http://www.example.com">www.example.com</a>;</div><div dir="auto"> location / {</div><div dir="auto"> </div><div dir="auto"> try_files $uri $uri/ =404;</div><div dir="auto"> }</div><div dir="auto"><br></div><div dir="auto"> location ~ \.php$ {</div><div dir="auto"> include snippets/fastcgi-php.conf;</div><div dir="auto"> fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;</div><div dir="auto"> }</div><div dir="auto"><br></div><div dir="auto">}</div></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
<br>
f<br>
-- <br>
Francis Daly <a href="mailto:francis@daoine.org" target="_blank" rel="noreferrer">francis@daoine.org</a><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a><br>
<a href="https://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer noreferrer" target="_blank">https://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div></div></div>