Wrong content served
Daniel A. Rodriguez
drodriguez at unau.edu.ar
Tue Jan 2 21:00:30 UTC 2024
Hi both Francis and Jake. Sorry for the late response
This is the content of such file
# cat /etc/nginx/snippets/location-letsencrypt.conf
location ^~ /.well-known/acme-challenge/ {
alias /var/www/le_root/.well-known/acme-challenge/;
}
and the directory exists
# ls -alh /var/www/le_root/.well-known/acme-challenge/
total 28K
drwxr-xr-x 2 root root 4,0K ene 2 00:14 .
drwxr-xr-x 3 root root 4,0K sep 1 2021 ..
-rw-r--r-- 1 root root 87 sep 2 2021 9nxS2wAszlGI
-rw-r--r-- 1 root root 87 sep 9 2021 AEzjuq9P8yXQ
-rw-r--r-- 1 root root 87 sep 9 2021 TPlVMnrhufmE
-rw-r--r-- 1 root root 87 oct 14 2021 YbHZSf8CqW40
-rw-r--r-- 1 root root 87 sep 9 2021 ZHFolsWkDv90
and what curl returns
# curl -i http://material.av.unau.edu.ar/
HTTP/1.1 200 OK
Date: Tue, 02 Jan 2024 20:44:45 GMT
Server: Apache/2.4.58
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=cfj2h18l4u9j99o6pa4k77eaff; path=/
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
<!DOCTYPE html>
<html lang="es">
<head>
<title> Oficina virtual - UNAU </title>
<meta charset="utf-8">
Such content is from another host: oficinavirtual.unau.edu.ar. Which is
working as expected in its own domain.
I use acme.sh script to deploy SSL certificates.
El 26/12/23 a las 21:15, Jeff Dyke escribió:
> In addition to Francis' always helpful ask. You have a domain problem
> with material.av.domain <http://material.av.domain/> and it may be
> from /etc/hosts all the way to public DNS. Or, incorrectly supplied
> *location-letsencrypt.conf.*
>
> If you provide that file contents, you'll likely see your own error as
> you send it (i've done it dozens of times, its not an insult)
>
>
>
> On Tue, Dec 26, 2023 at 6:59 PM Francis Daly <francis at daoine.org> wrote:
>
> 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
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> https://mailman.nginx.org/mailman/listinfo/nginx
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> https://mailman.nginx.org/mailman/listinfo/nginx
--
<div dir="ltr">________________________________________________<br />
<table>
<tbody>
<tr>
<td><img src="https://correo.unau.edu.ar/skins/elastic/images/logo.svg" width="73" height="96" /></td>
<td><strong>Daniel A. Rodriguez</strong><br /><em>Informática, Conectividad y Sistemas</em><br />Universidad Nacional del Alto Uruguay<br />San Vicente - Misiones - Argentina<br /><a href="https://informatica.unau.edu.ar" rel="noopener">informatica.unau.edu.ar</a></td>
</tr>
</tbody>
</table>
</div>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20240102/083563f8/attachment-0001.htm>
More information about the nginx
mailing list