pk@debian-s-websites:~$ sudo tail -f /var/log/nginx/error.log 2021/12/13 06:27:24 [error] 17999#17999: *675 directory index of "/var/www/cxxxn.org/" is forbidden, client: 213.7.43.53, server: cxxxn.org, request: "GET / HTTP/1.1", host: "www.cxxxn.org"If I try lynx http://localhost:5000 locally I get a perfect session.
So kestrel is working but nginx is not configured correctly. I think
the mistake is in my the config file for cxxxn.org has a line saying: "index index.html index.htm index.nginx-debian.html" To test this, I put a <html>Hello World</html> file in the root folder and it was served up correctly. If I then try http://cxxxn.org/Privacy I get a 404 error.
Does anyone know if my guess that the "index" line in the configuration is the problem is correct?
How can I configure Nginx to serve content from Asp.Net Core where there is no static html file being generated?
Thanks in advance.
Patrick Kirk wrote:
6. If serving dynamic content, where to get it
A program running on port 5000 is a fine place to serve dynamic
content from, but you haven't told nginx about it.
I'll bet you that this "kestrel" program comes with
documentation about using a reverse proxy, which is what you
want nginx to do.
-dsr-