0

So far I'm using this configuration for a server block

server {
  listen 80;
  server_name mydomain.com;
  root /D:/www;
 }

But it's giving me this error 403 Forbidden

nginx/1.5.12

Apparently it's reading the vhost, but it's not reading the right directory.

How can I change the directory to whatever I want?

Not root, I want it specially on D:/www/my page

IMPORTANT: I'm using windows 7, so the root directory won't be like /var/user,

My directories are D:\www\mypage

So, how should I put in the nginx config file?

2 Answers2

0

Use quotes:

root "D:/www/my page"
TLama
  • 75,147
  • 17
  • 214
  • 392
0

Omit the drive letter and try below directive to define document root of nginx in Windows OS.

root /www;

Or, if your configuration is on different drive try

root /d/www;

If directory name contains space, enclose the path in quotes.

AnkitK
  • 388
  • 3
  • 10