<p>I found the problem it is unrelated.  The index.html file itself was the 'directory access is forbidden</p>

CC BY-SA 4.0
2018-09-24T15:28:58.517Z
2018-09-24T15:28:58.517Z
Gregg
<p>I installed WinNMP with the typical install.
and added two files that I am using to check the installation(among others)</p>

<pre><code>C:\Proj\MyRG\public_html\test.htm
C:\Proj\MyRG\public_html\application\index.htm
c:\winnmp\conf\nginx.conf file contains:
    root "C:/Proj/MyRG/public_html/application"
C:\Windows\System32\drivers\etc\host file contains both these lines after the install:
    127.0.0.1 localhost
    127.0.0.1 ProjWinNMPTest.test #WinNMP ProjWinNMPTest.test #WinNMP public_html.test
</code></pre>

<p>Regardless of how I set WinNMP Manager-->Options(button)-->Projects Dir
when I read the test files from a browser </p>

<pre><code>http://127.0.0.1/public_html/test.htm 
    correctly reads the simple htlm file.
http://127.0.0.1/public_html/application/index.html 
    returns "directory access is forbidden
'http://127.0.0.1/public_html/index.html 
    returns "404 file not found"
</code></pre>

<p>1) How can I set the root file for 127.0.0.1 to point to <code>C:/Proj/MyRG/public_html/application</code> instead of <code>C:/Proj/MyRG/public_html</code> ?</p>

<p>2) How can I get permission to access the directory ?</p>

CC BY-SA 4.0
2018-09-24T07:45:27.440Z
application/public_html is what you defined as root of the server, remove the public_html/application from your uris and it will work. I.e: `http://127.0.0.1/index.html`
Tensibai
<nginx>
WinNMP (Nginx) returning "Directory access is forbidden."
Gregg
# WinNMP (Nginx) returning "Directory access is forbidden."

(Asked by: username_0 on 2018-09-23)

I installed WinNMP with the typical install.
and added two files that I am using to check the installation(among others)
C:\Proj\MyRG\public_html\test.htm
C:\Proj\MyRG\public_html\application\index.htm
c:\winnmp\conf\nginx.conf file contains:
    root "C:/Proj/MyRG/public_html/application"
C:\Windows\System32\drivers\etc\host file contains both these lines after the install:
    127.0.0.1 localhost
    127.0.0.1 ProjWinNMPTest.test #WinNMP ProjWinNMPTest.test #WinNMP public_html.test

Regardless of how I set WinNMP Manager-->Options(button)-->Projects Dir
when I read the test files from a browser 
http://127.0.0.1/public_html/test.htm 
    correctly reads the simple htlm file.
http://127.0.0.1/public_html/application/index.html 
    returns "directory access is forbidden
'http://127.0.0.1/public_html/index.html 
    returns "404 file not found"

1) How can I set the root file for 127.0.0.1 to point to C:/Proj/MyRG/public_html/application instead of C:/Proj/MyRG/public_html ?
2) How can I get permission to access the directory ?

**Tags:** nginx

> **Comments:**
> **username_1**: application/public_html is what you defined as root of the server, remove the public_html/application from your uris and it will work. I.e: `http://127.0.0.1/index.html`  

---

## 1 answers

### Answer by username_0 on 2018-09-24. Score: 1 | Accepted answer

I found the problem it is unrelated. The index.html file itself was the 'directory access is forbidden


---

