Welcome! Log In Create A New Profile

Advanced

nginx is considering only .html files with the name "index"

Posted by Nisharunnisa 
nginx is considering only .html files with the name "index"
June 15, 2021 10:40AM
Hi Team ,

I am configuring nginx in Windows . When i am changing the file name from index.html to sample.html or any other name it is throwing an error

403 Forbidden error

Initially i thought it is Permission error but i figured out it is the file name

How to change the default.conf to serve any files with .html extension

Thanks & Regards
Nisharunnisa
Re: nginx is considering only .html files with the name "index"
June 15, 2021 10:58AM
Within the location block you will see:
index index.html index.htm;

There you can edit/add whatever you like.

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: nginx is considering only .html files with the name "index"
June 16, 2021 08:22AM
Hi
Thank you for the Response !

I tried that way it either throws permission denied or Forbidden error. I have actually replicated same on my WSL ubuntu machine . I see all the permissions set on the Files but i still get permission denied . Please find my nginx.conf below & also the Screenshot of permissions on my files
Attachments:
open | download - vpd.conf (2.5 KB)
open | download - p.PNG (16.7 KB)
Re: nginx is considering only .html files with the name "index"
June 16, 2021 09:53AM
Whats in the log files?

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 72
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready