<div>hi,</div><div>what I want to do is:</div><div><br></div><div>1) trying to serve content like url => <a href="http://my.domain.tld/static/bla-bla-bla?id=12345" target="_blank">http://my.domain.tld/static/bla-bla-bla?id=12345</a> </div>
<div>2) check an html page on cache (on redis)</div><div>3) if doesn't exists, let's create it (via php script /api/entrypoint.php?... )</div><div>4) always update statistical counters (asyncronous batch)</div>
<div>
<br></div><div>problem:</div><div>step 4) never processed until I comment "error page 404 = ...".</div><div>In thi case all request to redis are processed (via <a href="http://127.0.0.1:33333" target="_blank">127.0.0.1:33333</a> and <a href="http://127.0.0.1:22222" target="_blank">127.0.0.1:22222</a>) but a 404 error on browser too :(</div>
<div><br></div><div><br></div><div>my nginx.conf</div><div><br></div><div><br></div><div>location ^~ /static/ {</div><div><br></div><div> # 2) check an html page (on redis)</div><div> set $redis_key "my:permalink:$arg_id:html";</div>
<div> redis_pass <a href="http://127.0.0.1:33333" target="_blank">127.0.0.1:33333</a>;</div><div><br></div><div> # 3) if doesn't exists, let's create it (via php)</div><div> error_page 404 = /api/entrypoint.php?action=do_html&id=$arg_id;</div>
<div><br></div><div> # 4) always update statistical counters (asyncronous batch)</div><div> post_action /update_counters;</div><div>}</div><div><br></div><div>location /update_counters {</div><div><br></div><div> set $queue_name 'my:queue:to:process:asyncronous';</div>
<div> redis2_query<span style="white-space:pre-wrap">        </span>lpush $queue_name $request_uri;</div><div> redis2_pass<span style="white-space:pre-wrap">        </span><a href="http://127.0.0.1:22222" target="_blank">127.0.0.1:22222</a>;</div>
<div><br></div><div>}</div><div><br></div><div># pass the PHP scripts to FastCGI server listening on <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a></div><div>location ~ \.php$ {</div><div><br></div><div>
root html;</div><div> fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;</div>
<div> fastcgi_index index.php;</div><div> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;</div><div> include fastcgi_params;</div><div><br></div><div>}</div><div><br></div><div><br></div><div>
thanks</div><div>maxf3r</div><br>
-- <br><h1 style="padding-bottom:8px;font-weight:normal"><font size="2"><span style="vertical-align:top" dir="ltr" title="Happiness only real when shared">.. happiness only real when shared [supertramp]<br></span></font></h1>
<br>