0

I am trying with Nginx under windows; it requires the file located in the /cygdrive/c.

If I installed cygwin, then everything is file. I am wondering if I can use Nginx without cygwin? How to specify the file in the location like c:\nginx

Adam Lee
  • 24,710
  • 51
  • 156
  • 236

2 Answers2

0

Yes you can use a nginx without Cygwin. See http://wiki.nginx.org/Install#Official_Win32_Binaries

Ian Mariano
  • 509
  • 2
  • 8
0

You can try following code:

location / {

 root  /cygdrive/d/www/; # '/cygdrive/d/' equal to  'D:\' in Nginx under Cygwin
            index  index.html index.htm;            
}

If we want to set D:\www\newsB\ for http://www.#yours.com/newsA/, then we better use alias or rewrite directive of Nginx, something like:

location /newsA/ {

alias /cygdrive/d/www/newsB/;

} 
Philip Allgaier
  • 3,505
  • 2
  • 26
  • 53