[Web] 请问在Nginx里如何限制某一个文件的连接数

weixin_38088241 2010-02-24 11:29:46

nginx version: nginx/0.7.65

安装了NginxHttpLimitZoneModule


比如我想限制/bbs/index.php的连接数,我使用
server{
.......
    location ~ ^/bbs/index.php$
    {
        limit_conn   index  1;
    }

    location ~ \.php$ {
            root           html;
            fastcgi_pass   unix:/dev/shm/php-cgi.sock;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /home/xxx/public_html$fastcgi_script_name;
            include        fastcgi_params;
        }
.........
}
可是这样把php的源代码都泄漏出来了

请问怎么样才能限制某一个php文件的连接数
不知道应该怎么样
...全文
13 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复

476

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧