Error «zero size shared memory zone» when creating a site
Symptoms
When creating a site in ispmanager 6, the following message is displayed:
«An error occurred while working with websites. An attempt to test configuration of the web-server while saving the file '/etc/nginx/vhosts/<username>/<site-name.conf>' failed... [emerg] zero size shared memory zone “<site-name>” nginx: configuration file /etc/nginx/nginx.conf test failed».
Causes
The Nginx web server cannot apply the settings to enable DDoS protection.
Solution
Insufficient RAM
Check the amount of available memory using the free -hcommand. If necessary, increase the overall amount of RAM.
Since memory is allocated to provide DDoS protection for sites, you can disable this option in the Optimization and DDoS protectiontab when creating a site.
Duplicated DDoS protection directives
Make sure the directory at /etc/nginx/vhosts/<username>/ doesn't contain a configuration file with the name of the site being created. Typically, this is where the limit_req_zone and limit_conn_zone directives remain and are read by the web server as duplicates. If such a file exists, delete it or move it to a diffrent directory.
Also, make sure the limit_req_zone and limit_conn_zone directives aren't specified in the main Nginx configuration at /etc/nginx/nginx.conf. We recommend removing these directives and using the default configuration that comes with the control panel.