当我运行 nginx -t时
我收到错误
nginx:[emerg]无法构建server_names_hash,你应该增加server_names_hash_bucket_size:32
然后我去更新nginx.conf文件,将server_names_hash_bucket_size行更新为32.
然后我运行 服务nginx重新加载
然后再次运行nginx -t我得到同样的错误.
为什么它没有生效,我该如何解决这个问题呢?
在 nginx 1.14 中,nginx.conf 中没有默认设置,因此将其添加server_names_hash_bucket_size 64;到http
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
server_names_hash_bucket_size 64;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3371 次 |
| 最近记录: |