shared memory zone "media" conflicts with already declared size 0
atipico
nginx-forum at nginx.us
Fri Feb 8 15:01:30 UTC 2013
I am using nginx version: nginx/1.2.6 and facing a similar error:
Starting nginx: nginx: the configuration file /etc/nginx/nginx.conf syntax
is ok
nginx: [emerg] zero size shared memory zone "limit_per_ip"
nginx: configuration file /etc/nginx/nginx.conf test failed
invoke-rc.d: initscript nginx, action "start" failed.
Here's my nginx.conf file:
user www-data;
worker_processes 2;
pid /var/run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
# Cloudflare
set_real_ip_from 204.93.240.0/24;
set_real_ip_from 204.93.177.0/24;
set_real_ip_from 199.27.128.0/21;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
real_ip_header CF-Connecting-IP;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 10;
send_timeout 10;
#limit_zone limit_per_ip $binary_remote_addr 16m;
server_tokens off;
#charset utf-8;
expires -1; #A negative time sets the Cache-Control header to no-cache
client_max_body_size 10m;
client_body_buffer_size 128k;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
gzip_vary on; #you instruct proxies to store both a compressed and
uncompressed version of the content
# gzip_proxied any;
gzip_comp_level 6;
# gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript
text/xml application/xml application/xml+rss text/javascript;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Thanks for any help.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,9716,236021#msg-236021
More information about the nginx
mailing list