<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Hi Reinis,<br><br>One more question, for now, I'm using below code to limit the access of some URLs, such as<br>/forum.php?mod=forumdisplay?*****<br>/forum.php?mod=viewthread&****<br><br> location ~*^/(home|forum|portal).php$ {<br> root /web/www;<br> limit_conn addr 5;<br> limit_req zone=refresh burst=5 nodelay;<br> fastcgi_pass unix:/tmp/nginx.socket;<br> fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;<br> include fastcgi_params;<br> }<br> location ~ \.php$ {<br> root /web/www;<br> fastcgi_pass unix:/tmp/nginx.socket;<br> fastcgi_index index.php;<br> fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;<br> include fastcgi_params;<br> }<br><br>But I don't want to limit user access to below URL <br><br>/forum.php?mod=image&***<br><br>So I added below section into Nginx<br><br> location ~*^/forum.php?mod=image$ {<br> root /web/www;<br> fastcgi_pass unix:/tmp/nginx.socket;<br> fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;<br> include fastcgi_params;<br> }<br><br>But it seems that this rule is not working, could you please help?<br><div></div><div id="divNeteaseMailCard"></div><br><pre><br>At 2012-07-18 20:22:21,"Reinis Rozitis" <r@roze.lv> wrote:
>> For now, the problem for me is, if I put below codes in NGINX, then my php file will stop execute.
>
>A quick fix would be just nest the locations or duplicate the fastcgi part. For example:
>
>location ~*^/(home|forum|portal).php$ {
> limit_conn addr 3;
> limit_req zone=refresh burst=3 nodelay;
>
> fastcgi_pass unix:/tmp/nginx.socket;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
> include fastcgi_params;
>}
>
>
>rr
>
>_______________________________________________
>nginx mailing list
>nginx@nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx
</pre></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>