Reputation: 78676
I'm using the Windows setup file from Nginx For Windows
But It doesn't allow to change the install location, so it defaults to C:\nginx
Is there a way to update the config file to change the root directory to D:\blabla
?
Sample code from nginx.conf
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
Upvotes: 3
Views: 18365
Reputation: 103
I don't know howit was two years ago but with an current Version (1.13.9) you only need to set the root of your Server
server {
listen 80;
server_name localhost;
location / {
root D:\blabla;
index index.html index.htm;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root D:\blabla;
}
}
Upvotes: 2
Reputation: 454
root d:/path/whereever; will work without issues, but do use a proper windows version like the Butterfly or Caterpillar release and not those other crippled versions.
even a root '//192.168.2.5/mount/webdrive'; will work!
Upvotes: 2