<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>shared memory zone &amp;quot;media&amp;quot; conflicts with already declared size 0</title>
<description>what seems to be the problem?
[emerg]: the size 52428800 of shared memory zone &amp;quot;media&amp;quot; conflicts with 
already declared size 0 in /etc/nginx/conf.d/cache.conf:5
configuration file /etc/nginx/nginx.conf test failed
my configuration below
# nginx.conf
user nobody nogroup;
worker_processes 5;
error_log /var/log/nginx/error.log;
pid /var/run/nginx/nginx.pid;
worker_rlimit_nofile 8192;
events {
use epoll;
worker_connections 4096;
}
http {
include base/std;
include base/log_format;
include base/gzip;
include base/proxy_conf_real_ip;
include /etc/nginx/conf.d/*.conf;
}
# base/std
include base/mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay off;
# base/log_format
log_format main '$remote_addr - $remote_user [$time_local] '
'&amp;quot;$request&amp;quot; $status $body_bytes_sent &amp;quot;$http_referer&amp;quot; '
'&amp;quot;$http_user_agent&amp;quot; &amp;quot;$http_x_forwarded_for&amp;quot;';
# base/gzip
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml 
application/xml application/xml+rss text/javascript;
# base/proxy_conf_real_ip
include base/proxy_conf
proxy_set_header X-Real-IP $http_x_real_ip;
# base/proxy_conf
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
# conf.d/cache.conf
client_body_temp_path /mnt/client_temp;
proxy_temp_path /mnt/proxy_temp;
fastcgi_temp_path /mnt/fastcgi_temp;
proxy_cache_path /mnt/media levels=1:2 keys_zone=media:50m max_size=5000m;
server {
listen 80;
location / {
proxy_pass http://media.server:8080;
include extra/cache;
}
}
# conf.d/ssl.conf
server {
listen 443;
ssl on;
ssl_certificate ssl/ssl.crt;
ssl_certificate_key ssl/ssl.key;
ssl_session_timeout 5m;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
location / {
proxy_pass https://media.server:4430;
include extra/cache;
}
}
# extra/cache
proxy_cache media;
proxy_cache_key $request_uri;
proxy_cache_valid 200 28d;
proxy_cache_valid 404 1m;
proxy_cache_valid 500 2m;
proxy_cache_use_stale error timeout invalid_header http_500 http_502 
http_503 http_504;
proxy_ignore_headers Expires Cache-Control;
FileETag on;
expires max;</description><link>http://forum.nginx.org/read.php?2,9716,9716#msg-9716</link><lastBuildDate>Tue, 21 May 2013 23:11:21 -0400</lastBuildDate>
<generator>Phorum 5.2.16</generator>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,236028#msg-236028</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,236028#msg-236028</link><description><![CDATA[On Fri, Feb 08, 2013 at 10:01:30AM -0500, atipico wrote:<br />&gt; I am using nginx version: nginx/1.2.6 and facing a similar error:<br />&gt;<br />&gt; Starting nginx: nginx: the configuration file /etc/nginx/nginx.conf syntax<br />&gt; is ok<br />&gt; nginx: [emerg] zero size shared memory zone &quot;limit_per_ip&quot;<br />&gt; nginx: configuration file /etc/nginx/nginx.conf test failed<br />&gt; invoke-rc.d: initscript nginx, action &quot;start&quot; failed.<br />&gt;<br />&gt; Here's my nginx.conf file:<br />&gt;<br />[...]<br />&gt; http {<br />[...]<br />&gt; #limit_zone limit_per_ip $binary_remote_addr 16m;<br /><br />The &quot;limit_per_ip&quot; zone, including its size of 16 megabytes,<br />was originally configured here.<br /><br />&gt; include /etc/nginx/mime.types;<br />[...]<br />&gt; include /etc/nginx/conf.d/*.conf;<br />&gt; include /etc/nginx/sites-enabled/*;<br /><br />At least one of the included files refers to this zone through<br />the &quot;limit_conn&quot; directive. The diagnostics is rather limited<br />in this case, but the message tells you that the size of the<br />shared memory zone &quot;limit_per_ip&quot; is unknown (because the<br />corresponding directive is commented out).<br /><br />JFYI, in modern versions of nginx the &quot;limit_conn_zone&quot; directive<br />should be used instead. See http://nginx.org/r/limit_zone for<br />details.<br /><br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>Ruslan Ermilov</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Fri, 08 Feb 2013 13:46:01 -0500</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,236021#msg-236021</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,236021#msg-236021</link><description><![CDATA[I am using nginx version: nginx/1.2.6 and facing a similar error:<br /><br />Starting nginx: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok<br />nginx: [emerg] zero size shared memory zone &quot;limit_per_ip&quot;<br />nginx: configuration file /etc/nginx/nginx.conf test failed<br />invoke-rc.d: initscript nginx, action &quot;start&quot; failed.<br /><br />Here's my nginx.conf file:<br /><br />user www-data;<br />worker_processes 2;<br />pid /var/run/nginx.pid;<br /><br />events {<br />worker_connections 768;<br /># multi_accept on;<br />}<br /><br />http {<br /><br /># Cloudflare<br />set_real_ip_from 204.93.240.0/24;<br />set_real_ip_from 204.93.177.0/24;<br />set_real_ip_from 199.27.128.0/21;<br />set_real_ip_from 173.245.48.0/20;<br />set_real_ip_from 103.22.200.0/22;<br />set_real_ip_from 141.101.64.0/18;<br />set_real_ip_from 108.162.192.0/18;<br />set_real_ip_from 190.93.240.0/20;<br />real_ip_header CF-Connecting-IP;<br /><br />sendfile on;<br />tcp_nopush on;<br />tcp_nodelay on;<br />types_hash_max_size 2048;<br /><br />client_body_timeout 10;<br />client_header_timeout 10;<br />keepalive_timeout 10;<br />send_timeout 10;<br />#limit_zone limit_per_ip $binary_remote_addr 16m;<br /><br />server_tokens off;<br />#charset utf-8;<br /><br />expires -1; #A negative time sets the Cache-Control header to no-cache<br /><br />client_max_body_size 10m;<br />client_body_buffer_size 128k;<br /><br /># server_name_in_redirect off;<br /><br />include /etc/nginx/mime.types;<br />default_type application/octet-stream;<br /><br />access_log /var/log/nginx/access.log;<br />error_log /var/log/nginx/error.log;<br /><br />gzip on;<br />gzip_disable &quot;msie6&quot;;<br />gzip_vary on; #you instruct proxies to store both a compressed and uncompressed version of the content<br /># gzip_proxied any;<br />gzip_comp_level 6;<br /># gzip_buffers 16 8k;<br />gzip_http_version 1.1;<br />gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;<br /><br />include /etc/nginx/conf.d/*.conf;<br />include /etc/nginx/sites-enabled/*;<br />}<br /><br />Thanks for any help.]]></description>
<dc:creator>atipico</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Fri, 08 Feb 2013 10:01:29 -0500</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,235955#msg-235955</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,235955#msg-235955</link><description><![CDATA[SO cool ! I tested it and fix, Thanks!]]></description>
<dc:creator>longnt</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Wed, 06 Feb 2013 01:57:27 -0500</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9913#msg-9913</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9913#msg-9913</link><description><![CDATA[Hello!<br /><br />On Tue, Sep 29, 2009 at 04:05:23PM +0300, Gena Makhomed wrote:<br /><br />&gt; On Tuesday, September 29, 2009 at 13:32:10, Maxim Dounin wrote:<br />&gt;<br />&gt; MD&gt; Globs can be used *only* for completely independent files<br />&gt; MD&gt; (e.g. containing definitions of different server{} blocks).<br />&gt;<br />&gt; may be config test should generate warning &quot;Undefined behavior&quot;<br />&gt; if wildcard includes not containing completely independent files ?<br /><br />You never know if included chunks are dependent or not. E.g. the<br />following lines are completely independent given that $var defined<br />somewhere before (assume each line in it's own include):<br /><br />rewrite ^/blah$ /$var/blah;<br />rewrite ^/oops$ /$var/oops;<br /><br />while these aren't:<br /><br />rewrite ^/blah$ /$var/blah;<br />set $var &quot;something&quot;<br />rewrite ^/oops$ /$var/oops;<br /><br />Not even talking about more complex cases.<br /><br />Maxim Dounin]]></description>
<dc:creator>Maxim Dounin</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 29 Sep 2009 09:52:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9905#msg-9905</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9905#msg-9905</link><description><![CDATA[On Tue, Sep 29, 2009 at 03:15:21PM +0400, Maxim Dounin wrote:<br /><br />&gt; Hello!<br />&gt;<br />&gt; On Tue, Sep 29, 2009 at 01:11:17PM +0400, Igor Sysoev wrote:<br />&gt;<br />&gt; &gt; On Tue, Sep 29, 2009 at 10:57:02AM +0200, Tomasz Pajor wrote:<br />&gt; &gt;<br />&gt; &gt; &gt; &gt;<br />&gt; &gt; &gt; &gt;&gt; what seems to be the problem?<br />&gt; &gt; &gt; &gt;&gt;<br />&gt; &gt; &gt; &gt;&gt; [emerg]: the size 52428800 of shared memory zone &quot;media&quot; conflicts with<br />&gt; &gt; &gt; &gt;&gt; already declared size 0 in /etc/nginx/conf.d/cache.conf:5<br />&gt; &gt; &gt; &gt;&gt; configuration file /etc/nginx/nginx.conf test failed<br />&gt; &gt; &gt; &gt;&gt;<br />&gt; &gt; &gt; &gt;<br />&gt; &gt; &gt; &gt; This may be caused if &quot;proxy_cache media&quot; is included before proxy_cache_path.<br />&gt; &gt; &gt; &gt;<br />&gt; &gt; &gt; this is true,<br />&gt; &gt; &gt; in /etc/nginx/conf.d i have two files, cache.conf and ssl.conf, and what<br />&gt; &gt; &gt; it seems the ssl.conf is loaded first, shouldn't the files be loaded in<br />&gt; &gt; &gt; alphabetical order?<br />&gt; &gt;<br />&gt; &gt; Currently, files are unsorted.<br />&gt; &gt; Probably, it should be changed to alphabetical order, but I'm not sure.<br />&gt;<br />&gt; BTW, have you seen any configurations that may seriously suffer<br />&gt; from changing this to alpabetical order?<br />&gt;<br />&gt; As far as I understand performance drop will be noticeable<br />&gt; somewhere near 10k+ includes, while serious problems are unlikely<br />&gt; to happen before something like 100k+...<br /><br />The single stopper now is Win32: FindFirstFile/FindNextFile may return<br />unordered files.<br /><br /><br />--<br />Igor Sysoev<br />http://sysoev.ru/en/]]></description>
<dc:creator>Igor Sysoev</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 29 Sep 2009 09:18:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9902#msg-9902</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9902#msg-9902</link><description><![CDATA[On Tuesday, September 29, 2009 at 13:32:10, Maxim Dounin wrote:<br /><br />MD&gt; Globs can be used *only* for completely independent files<br />MD&gt; (e.g. containing definitions of different server{} blocks).<br /><br />may be config test should generate warning &quot;Undefined behavior&quot;<br />if wildcard includes not containing completely independent files ?<br /><br />may be only with -w command line switch,<br />analogue of perl &quot;use warnings;&quot; pragma:<br /><br />$ perl -h | grep -- -w<br />-w enable many useful warnings (RECOMMENDED)<br /><br />--<br />Best regards,<br />Gena]]></description>
<dc:creator>Gena Makhomed</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 29 Sep 2009 09:12:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9866#msg-9866</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9866#msg-9866</link><description><![CDATA[Hello!<br /><br />On Tue, Sep 29, 2009 at 01:11:17PM +0400, Igor Sysoev wrote:<br /><br />&gt; On Tue, Sep 29, 2009 at 10:57:02AM +0200, Tomasz Pajor wrote:<br />&gt;<br />&gt; &gt; &gt;<br />&gt; &gt; &gt;&gt; what seems to be the problem?<br />&gt; &gt; &gt;&gt;<br />&gt; &gt; &gt;&gt; [emerg]: the size 52428800 of shared memory zone &quot;media&quot; conflicts with<br />&gt; &gt; &gt;&gt; already declared size 0 in /etc/nginx/conf.d/cache.conf:5<br />&gt; &gt; &gt;&gt; configuration file /etc/nginx/nginx.conf test failed<br />&gt; &gt; &gt;&gt;<br />&gt; &gt; &gt;<br />&gt; &gt; &gt; This may be caused if &quot;proxy_cache media&quot; is included before proxy_cache_path.<br />&gt; &gt; &gt;<br />&gt; &gt; this is true,<br />&gt; &gt; in /etc/nginx/conf.d i have two files, cache.conf and ssl.conf, and what<br />&gt; &gt; it seems the ssl.conf is loaded first, shouldn't the files be loaded in<br />&gt; &gt; alphabetical order?<br />&gt;<br />&gt; Currently, files are unsorted.<br />&gt; Probably, it should be changed to alphabetical order, but I'm not sure.<br /><br />BTW, have you seen any configurations that may seriously suffer<br />from changing this to alpabetical order?<br /><br />As far as I understand performance drop will be noticeable<br />somewhere near 10k+ includes, while serious problems are unlikely<br />to happen before something like 100k+...<br /><br />Maxim Dounin]]></description>
<dc:creator>Maxim Dounin</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 29 Sep 2009 07:22:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9859#msg-9859</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9859#msg-9859</link><description><![CDATA[Maxim Dounin wrote:<br />&gt; Hello!<br />&gt;<br />&gt; On Tue, Sep 29, 2009 at 11:41:15AM +0200, Tomasz Pajor wrote:<br />&gt;<br />&gt;<br />&gt;&gt;&gt;&gt;&gt;&gt; what seems to be the problem?<br />&gt;&gt;&gt;&gt;&gt;&gt;<br />&gt;&gt;&gt;&gt;&gt;&gt; [emerg]: the size 52428800 of shared memory zone &quot;media&quot;<br />&gt;&gt;&gt;&gt;&gt;&gt; conflicts with already declared size 0 in<br />&gt;&gt;&gt;&gt;&gt;&gt; /etc/nginx/conf.d/cache.conf:5<br />&gt;&gt;&gt;&gt;&gt;&gt; configuration file /etc/nginx/nginx.conf test failed<br />&gt;&gt;&gt;&gt;&gt;&gt;<br />&gt;&gt;&gt;&gt;&gt; This may be caused if &quot;proxy_cache media&quot; is included before proxy_cache_path.<br />&gt;&gt;&gt;&gt;&gt;<br />&gt;&gt;&gt;&gt; this is true,<br />&gt;&gt;&gt;&gt; in /etc/nginx/conf.d i have two files, cache.conf and ssl.conf,<br />&gt;&gt;&gt;&gt; and what it seems the ssl.conf is loaded first, shouldn't the<br />&gt;&gt;&gt;&gt; files be loaded in alphabetical order?<br />&gt;&gt;&gt;&gt;<br />&gt;&gt;&gt; Currently, files are unsorted.<br />&gt;&gt;&gt; Probably, it should be changed to alphabetical order, but I'm not sure<br />&gt;&gt;&gt;<br />&gt;&gt; I don't know, never the less the desired order can be achieved by<br />&gt;&gt; adding digits in front of the file name, 001-cache.conf,<br />&gt;&gt; 002-ssl.conf fixed my issue.<br />&gt;&gt;<br />&gt;<br />&gt; No, desired order can't be achieved by adding digits. While using<br />&gt; globbed includes nginx loads them without any sorting, i.e. in<br />&gt; order how filesystem returns them.<br />&gt;<br />&gt; You happened to get correct order after your renames, but things<br />&gt; may again go wild at any moment (most likely when you'll touch<br />&gt; something in this directory).<br />&gt;<br />&gt; Currently the only solution is to include dependent files<br />&gt; explicitly. Globs can be used *only* for completely independent<br />&gt; files (e.g. containing definitions of different server{} blocks)<br />So maybe it is a good idea to add alphabetic order for the wildcard include.]]></description>
<dc:creator>Tomasz Pajor</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 29 Sep 2009 06:52:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9855#msg-9855</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9855#msg-9855</link><description><![CDATA[Hello!<br /><br />On Tue, Sep 29, 2009 at 11:41:15AM +0200, Tomasz Pajor wrote:<br /><br />&gt;<br />&gt; &gt;&gt;&gt;&gt;what seems to be the problem?<br />&gt; &gt;&gt;&gt;&gt;<br />&gt; &gt;&gt;&gt;&gt;[emerg]: the size 52428800 of shared memory zone &quot;media&quot;<br />&gt; &gt;&gt;&gt;&gt;conflicts with already declared size 0 in<br />&gt; &gt;&gt;&gt;&gt;/etc/nginx/conf.d/cache.conf:5<br />&gt; &gt;&gt;&gt;&gt;configuration file /etc/nginx/nginx.conf test failed<br />&gt; &gt;&gt;&gt;This may be caused if &quot;proxy_cache media&quot; is included before proxy_cache_path.<br />&gt; &gt;&gt;this is true,<br />&gt; &gt;&gt;in /etc/nginx/conf.d i have two files, cache.conf and ssl.conf,<br />&gt; &gt;&gt;and what it seems the ssl.conf is loaded first, shouldn't the<br />&gt; &gt;&gt;files be loaded in alphabetical order?<br />&gt; &gt;<br />&gt; &gt;Currently, files are unsorted.<br />&gt; &gt;Probably, it should be changed to alphabetical order, but I'm not sure<br />&gt; I don't know, never the less the desired order can be achieved by<br />&gt; adding digits in front of the file name, 001-cache.conf,<br />&gt; 002-ssl.conf fixed my issue.<br /><br />No, desired order can't be achieved by adding digits. While using<br />globbed includes nginx loads them without any sorting, i.e. in<br />order how filesystem returns them.<br /><br />You happened to get correct order after your renames, but things<br />may again go wild at any moment (most likely when you'll touch<br />something in this directory).<br /><br />Currently the only solution is to include dependent files<br />explicitly. Globs can be used *only* for completely independent<br />files (e.g. containing definitions of different server{} blocks).<br /><br />Maxim Dounin]]></description>
<dc:creator>Maxim Dounin</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 29 Sep 2009 06:36:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9847#msg-9847</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9847#msg-9847</link><description><![CDATA[On Tue, Sep 29, 2009 at 11:41:15AM +0200, Tomasz Pajor wrote:<br /><br />&gt;<br />&gt; &gt;&gt;&gt;&gt; what seems to be the problem?<br />&gt; &gt;&gt;&gt;&gt;<br />&gt; &gt;&gt;&gt;&gt; [emerg]: the size 52428800 of shared memory zone &quot;media&quot; conflicts with<br />&gt; &gt;&gt;&gt;&gt; already declared size 0 in /etc/nginx/conf.d/cache.conf:5<br />&gt; &gt;&gt;&gt;&gt; configuration file /etc/nginx/nginx.conf test failed<br />&gt; &gt;&gt;&gt;&gt;<br />&gt; &gt;&gt;&gt;&gt;<br />&gt; &gt;&gt;&gt; This may be caused if &quot;proxy_cache media&quot; is included before proxy_cache_path.<br />&gt; &gt;&gt;&gt;<br />&gt; &gt;&gt;&gt;<br />&gt; &gt;&gt; this is true,<br />&gt; &gt;&gt; in /etc/nginx/conf.d i have two files, cache.conf and ssl.conf, and what<br />&gt; &gt;&gt; it seems the ssl.conf is loaded first, shouldn't the files be loaded in<br />&gt; &gt;&gt; alphabetical order?<br />&gt; &gt;&gt;<br />&gt; &gt;<br />&gt; &gt; Currently, files are unsorted.<br />&gt; &gt; Probably, it should be changed to alphabetical order, but I'm not sure<br />&gt; I don't know, never the less the desired order can be achieved by adding<br />&gt; digits in front of the file name, 001-cache.conf, 002-ssl.conf fixed my<br />&gt; issue.<br /><br />Probably, names were reordered in the directory while renaming.<br /><br /><br />--<br />Igor Sysoev<br />http://sysoev.ru/en/]]></description>
<dc:creator>Igor Sysoev</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 29 Sep 2009 05:56:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9846#msg-9846</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9846#msg-9846</link><description><![CDATA[&gt;&gt;&gt;&gt; what seems to be the problem?<br />&gt;&gt;&gt;&gt;<br />&gt;&gt;&gt;&gt; [emerg]: the size 52428800 of shared memory zone &quot;media&quot; conflicts with<br />&gt;&gt;&gt;&gt; already declared size 0 in /etc/nginx/conf.d/cache.conf:5<br />&gt;&gt;&gt;&gt; configuration file /etc/nginx/nginx.conf test failed<br />&gt;&gt;&gt;&gt;<br />&gt;&gt;&gt;&gt;<br />&gt;&gt;&gt; This may be caused if &quot;proxy_cache media&quot; is included before proxy_cache_path.<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;<br />&gt;&gt; this is true,<br />&gt;&gt; in /etc/nginx/conf.d i have two files, cache.conf and ssl.conf, and what<br />&gt;&gt; it seems the ssl.conf is loaded first, shouldn't the files be loaded in<br />&gt;&gt; alphabetical order?<br />&gt;&gt;<br />&gt;<br />&gt; Currently, files are unsorted.<br />&gt; Probably, it should be changed to alphabetical order, but I'm not sure<br />I don't know, never the less the desired order can be achieved by adding<br />digits in front of the file name, 001-cache.conf, 002-ssl.conf fixed my<br />issue.]]></description>
<dc:creator>Tomasz Pajor</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 29 Sep 2009 05:48:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9839#msg-9839</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9839#msg-9839</link><description><![CDATA[On Tue, Sep 29, 2009 at 10:57:02AM +0200, Tomasz Pajor wrote:<br /><br />&gt; &gt;<br />&gt; &gt;&gt; what seems to be the problem?<br />&gt; &gt;&gt;<br />&gt; &gt;&gt; [emerg]: the size 52428800 of shared memory zone &quot;media&quot; conflicts with<br />&gt; &gt;&gt; already declared size 0 in /etc/nginx/conf.d/cache.conf:5<br />&gt; &gt;&gt; configuration file /etc/nginx/nginx.conf test failed<br />&gt; &gt;&gt;<br />&gt; &gt;<br />&gt; &gt; This may be caused if &quot;proxy_cache media&quot; is included before proxy_cache_path.<br />&gt; &gt;<br />&gt; this is true,<br />&gt; in /etc/nginx/conf.d i have two files, cache.conf and ssl.conf, and what<br />&gt; it seems the ssl.conf is loaded first, shouldn't the files be loaded in<br />&gt; alphabetical order?<br /><br />Currently, files are unsorted.<br />Probably, it should be changed to alphabetical order, but I'm not sure.<br /><br /><br />--<br />Igor Sysoev<br />http://sysoev.ru/en/]]></description>
<dc:creator>Igor Sysoev</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 29 Sep 2009 05:16:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9836#msg-9836</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9836#msg-9836</link><description><![CDATA[&gt;<br />&gt;&gt; what seems to be the problem?<br />&gt;&gt;<br />&gt;&gt; [emerg]: the size 52428800 of shared memory zone &quot;media&quot; conflicts with<br />&gt;&gt; already declared size 0 in /etc/nginx/conf.d/cache.conf:5<br />&gt;&gt; configuration file /etc/nginx/nginx.conf test failed<br />&gt;&gt;<br />&gt;<br />&gt; This may be caused if &quot;proxy_cache media&quot; is included before proxy_cache_path.<br />&gt;<br />this is true,<br />in /etc/nginx/conf.d i have two files, cache.conf and ssl.conf, and what<br />it seems the ssl.conf is loaded first, shouldn't the files be loaded in<br />alphabetical order?]]></description>
<dc:creator>Tomasz Pajor</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 29 Sep 2009 05:06:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9739#msg-9739</guid>
<title>Re: shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9739#msg-9739</link><description><![CDATA[On Mon, Sep 28, 2009 at 06:15:50PM +0200, Tomasz Pajor wrote:<br /><br />&gt; what seems to be the problem?<br />&gt;<br />&gt; [emerg]: the size 52428800 of shared memory zone &quot;media&quot; conflicts with<br />&gt; already declared size 0 in /etc/nginx/conf.d/cache.conf:5<br />&gt; configuration file /etc/nginx/nginx.conf test failed<br /><br />This may be caused if &quot;proxy_cache media&quot; is included before proxy_cache_path.<br /><br />&gt; my configuration below<br />&gt;<br />&gt; # nginx.conf<br />&gt; user nobody nogroup;<br />&gt; worker_processes 5;<br />&gt; error_log /var/log/nginx/error.log;<br />&gt; pid /var/run/nginx/nginx.pid;<br />&gt; worker_rlimit_nofile 8192;<br />&gt;<br />&gt; events {<br />&gt; use epoll;<br />&gt; worker_connections 4096;<br />&gt; }<br />&gt;<br />&gt; http {<br />&gt; include base/std;<br />&gt; include base/log_format;<br />&gt; include base/gzip;<br />&gt; include base/proxy_conf_real_ip;<br />&gt;<br />&gt; include /etc/nginx/conf.d/*.conf;<br />&gt; }<br />&gt;<br />&gt; # base/std<br />&gt; include base/mime.types;<br />&gt; default_type application/octet-stream;<br />&gt;<br />&gt; sendfile on;<br />&gt;<br />&gt; tcp_nopush on;<br />&gt; tcp_nodelay off;<br />&gt;<br />&gt; # base/log_format<br />&gt; log_format main '$remote_addr - $remote_user [$time_local] '<br />&gt; '&quot;$request&quot; $status $body_bytes_sent &quot;$http_referer&quot; '<br />&gt; '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';<br />&gt;<br />&gt; # base/gzip<br />&gt; gzip on;<br />&gt; gzip_http_version 1.0;<br />&gt; gzip_comp_level 2;<br />&gt; gzip_proxied any;<br />&gt; gzip_types text/plain text/css application/x-javascript text/xml<br />&gt; application/xml application/xml+rss text/javascript;<br />&gt;<br />&gt; # base/proxy_conf_real_ip<br />&gt; include base/proxy_conf<br />&gt; proxy_set_header X-Real-IP $http_x_real_ip;<br />&gt;<br />&gt; # base/proxy_conf<br />&gt; proxy_set_header Host $host;<br />&gt; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />&gt; client_max_body_size 10m;<br />&gt; client_body_buffer_size 128k;<br />&gt; proxy_connect_timeout 90;<br />&gt; proxy_send_timeout 90;<br />&gt; proxy_read_timeout 90;<br />&gt; proxy_buffers 32 4k;<br />&gt;<br />&gt; # conf.d/cache.conf<br />&gt; client_body_temp_path /mnt/client_temp;<br />&gt; proxy_temp_path /mnt/proxy_temp;<br />&gt; fastcgi_temp_path /mnt/fastcgi_temp;<br />&gt;<br />&gt; proxy_cache_path /mnt/media levels=1:2 keys_zone=media:50m max_size=5000m;<br />&gt;<br />&gt; server {<br />&gt; listen 80;<br />&gt;<br />&gt; location / {<br />&gt; proxy_pass http://media.server:8080;<br />&gt; include extra/cache;<br />&gt; }<br />&gt; }<br />&gt;<br />&gt; # conf.d/ssl.conf<br />&gt; server {<br />&gt; listen 443;<br />&gt;<br />&gt; ssl on;<br />&gt; ssl_certificate ssl/ssl.crt;<br />&gt; ssl_certificate_key ssl/ssl.key;<br />&gt;<br />&gt; ssl_session_timeout 5m;<br />&gt; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;<br />&gt;<br />&gt; location / {<br />&gt; proxy_pass https://media.server:4430;<br />&gt; include extra/cache;<br />&gt; }<br />&gt; }<br />&gt;<br />&gt; # extra/cache<br />&gt; proxy_cache media;<br />&gt; proxy_cache_key $request_uri;<br />&gt; proxy_cache_valid 200 28d;<br />&gt; proxy_cache_valid 404 1m;<br />&gt; proxy_cache_valid 500 2m;<br />&gt; proxy_cache_use_stale error timeout invalid_header http_500 http_502<br />&gt; http_503 http_504;<br />&gt; proxy_ignore_headers Expires Cache-Control;<br />&gt; FileETag on;<br />&gt; expires max;<br /><br />--<br />Igor Sysoev<br />http://sysoev.ru/en/]]></description>
<dc:creator>Igor Sysoev</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Mon, 28 Sep 2009 15:06:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,9716,9716#msg-9716</guid>
<title>shared memory zone &quot;media&quot; conflicts with already declared size 0</title><link>http://forum.nginx.org/read.php?2,9716,9716#msg-9716</link><description><![CDATA[what seems to be the problem?<br /><br />[emerg]: the size 52428800 of shared memory zone &quot;media&quot; conflicts with<br />already declared size 0 in /etc/nginx/conf.d/cache.conf:5<br />configuration file /etc/nginx/nginx.conf test failed<br /><br />my configuration below<br /><br /># nginx.conf<br />user nobody nogroup;<br />worker_processes 5;<br />error_log /var/log/nginx/error.log;<br />pid /var/run/nginx/nginx.pid;<br />worker_rlimit_nofile 8192;<br /><br />events {<br />use epoll;<br />worker_connections 4096;<br />}<br /><br />http {<br />include base/std;<br />include base/log_format;<br />include base/gzip;<br />include base/proxy_conf_real_ip;<br /><br />include /etc/nginx/conf.d/*.conf;<br />}<br /><br /># base/std<br />include base/mime.types;<br />default_type application/octet-stream;<br /><br />sendfile on;<br /><br />tcp_nopush on;<br />tcp_nodelay off;<br /><br /># base/log_format<br />log_format main '$remote_addr - $remote_user [$time_local] '<br />'&quot;$request&quot; $status $body_bytes_sent &quot;$http_referer&quot; '<br />'&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';<br /><br /># base/gzip<br />gzip on;<br />gzip_http_version 1.0;<br />gzip_comp_level 2;<br />gzip_proxied any;<br />gzip_types text/plain text/css application/x-javascript text/xml<br />application/xml application/xml+rss text/javascript;<br /><br /># base/proxy_conf_real_ip<br />include base/proxy_conf<br />proxy_set_header X-Real-IP $http_x_real_ip;<br /><br /># base/proxy_conf<br />proxy_set_header Host $host;<br />proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />client_max_body_size 10m;<br />client_body_buffer_size 128k;<br />proxy_connect_timeout 90;<br />proxy_send_timeout 90;<br />proxy_read_timeout 90;<br />proxy_buffers 32 4k;<br /><br /># conf.d/cache.conf<br />client_body_temp_path /mnt/client_temp;<br />proxy_temp_path /mnt/proxy_temp;<br />fastcgi_temp_path /mnt/fastcgi_temp;<br /><br />proxy_cache_path /mnt/media levels=1:2 keys_zone=media:50m max_size=5000m;<br /><br />server {<br />listen 80;<br /><br />location / {<br />proxy_pass http://media.server:8080;<br />include extra/cache;<br />}<br />}<br /><br /># conf.d/ssl.conf<br />server {<br />listen 443;<br /><br />ssl on;<br />ssl_certificate ssl/ssl.crt;<br />ssl_certificate_key ssl/ssl.key;<br /><br />ssl_session_timeout 5m;<br />ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;<br /><br />location / {<br />proxy_pass https://media.server:4430;<br />include extra/cache;<br />}<br />}<br /><br /># extra/cache<br />proxy_cache media;<br />proxy_cache_key $request_uri;<br />proxy_cache_valid 200 28d;<br />proxy_cache_valid 404 1m;<br />proxy_cache_valid 500 2m;<br />proxy_cache_use_stale error timeout invalid_header http_500 http_502<br />http_503 http_504;<br />proxy_ignore_headers Expires Cache-Control;<br />FileETag on;<br />expires max;]]></description>
<dc:creator>Tomasz Pajor</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Mon, 28 Sep 2009 12:20:01 -0400</pubDate></item>
</channel>
</rss>