我正在使用Nginx For Windows中的Windows安装文件
但它不允许更改安装位置,所以它默认为C:\nginx
有没有办法更新configuration文件,以将根目录更改为D:\blabla
?
来自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; } }
启动nginx时使用-p
参数:
nginx -p "D:\blabla"
root d:/ path / whereever; 将工作没有问题,但使用适当的Windows版本,如蝴蝶或卡特彼勒版本,而不是那些其他瘫痪版本。
甚至根“//192.168.2.5/mount/webdrive”; 将工作!