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
- Nginx web server cannot allocate memory to enable DDoS protection;
- This site was previously deleted, but its configuration file remains in the system.
Solution
Insufficient RAM
Check the amount of available memory using the free -h
command. 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 protection” tab when creating a site.
Configuration file already exists
Make sure there is no configuration file with the name of the site to be created in the directory at /etc/nginx/vhosts/<username>/
. If such a file already exists, delete it or move it to another directory.