[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Nginx and ASP.Net Core



Hi all,

I am trying to run an ASP.Net Core site on my hosted Debian box and I seem to have messed up the configuration.  All attempts to reach the page on port 80 get 403 Forbidden messages.

My error log says: 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.


Reply to: