简体   繁体   English

Nginx 1.11-nginx.conf文件已更改

[英]Nginx 1.11 - nginx.conf file changed

The nginx.conf is very different in nginx version 1.11 compared to 1.6. 与1.6相比,nginx版本1.11中的nginx.conf有很大不同。 Ownership is done by nginx instead of www-data, there is no include path for the sites-enabled directory and the new nginx.con file is around 20 lines of code. 所有权是由nginx而不是www-data来完成的,没有启用站点的目录的包含路径,并且新的nginx.con文件大约有20行代码。

With nginx 1.11, do I need to set an include of the web path or is this designed to pull a different nginx.conf from each website directory? 使用nginx 1.11,我是否需要设置Web路径的包含,还是设计用来从每个网站目录中提取不同的nginx.conf? Do I need to replace this nginx.conf with the sample config on the nginx website? 我是否需要在nginx网站上用示例配置替换此nginx.conf?

It should have an include /etc/nginx/conf.d/*.conf; 它应该包含一个include /etc/nginx/conf.d/*.conf; or something similar, so you should put your config in that directory. 或类似的内容,因此您应该将配置放在该目录中。 ie /etc/nginx/conf.d/www.example.com.conf /etc/nginx/conf.d/www.example.com.conf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM