Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu Nginx:在./conf.d/*.conf中重写现有指令_Ubuntu_Nginx_Webserver - Fatal编程技术网

Ubuntu Nginx:在./conf.d/*.conf中重写现有指令

Ubuntu Nginx:在./conf.d/*.conf中重写现有指令,ubuntu,nginx,webserver,Ubuntu,Nginx,Webserver,当我设置我的Nginx时,我不会更改Nginx.conf,因此更新软件会更容易(mysql、php等也是如此) 到目前为止,我只需要将新指令添加到配置中,但现在我第一次需要更改nginx.conf中存在的指令-我想将sendfile on更改为off,因此它解决了VirtualBox 当我尝试这样做时,我得到一个错误2015/10/18 23:04:50[emerg]3699#0:“sendfile”指令在/etc/nginx/conf.d/my.conf:1中重复 那怎么办呢?编辑nginx.

当我设置我的
Nginx
时,我不会更改
Nginx.conf
,因此更新软件会更容易(mysql、php等也是如此)

到目前为止,我只需要将新指令添加到配置中,但现在我第一次需要更改
nginx.conf
中存在的指令-我想将
sendfile on
更改为
off
,因此它解决了
VirtualBox

当我尝试这样做时,我得到一个错误
2015/10/18 23:04:50[emerg]3699#0:“sendfile”指令在/etc/nginx/conf.d/my.conf:1中重复

那怎么办呢?编辑nginx.conf实际上是我唯一的选择吗