/
/
Error “‘/etc/nginx/vhosts/’ failed: __res__”

Error “‘/etc/nginx/vhosts/’ failed: __res__”

Symptoms

When saving changes to the site configuration file, the error “An attempt to test configuration of the web-server while saving the file ‘/etc/nginx/vhosts/’ failed: __res__” occurs.

Causes

The value for the server_names_hash_bucket_size or server_names_hash_max_size parameter is too low.

Solutions

PLEASE NOTE!

We strongly recommend creating a backup of the Nginx configuration file before making any changes.

It's necessary to increase the value of one of the parameters in the Nginx configuration file at /etc/nginx/nginx.conf:

  • server_names_hash_bucket_size - set the value to at least “64”;
  • server_names_hash_max_size - set the value to at least “265”.

If any parameter is missing, specify it in the http section of the Nginx configuration file.

Restart the Nginx service to apply the changes:

systemctl nginx reload

In this article