开发者社区> 问答> 正文

[@talishboy][¥20]nginx的配置问题

我现在使用一个vps,在nginx后端接入tomcat容器。

tomcat的端口号是8080。

现在的问题是,用户可以直接输入端口号从而绕过nginx直接访问tomcat。

我该怎么做才能让nginx转发所有请求,且用户不能够通过输入8080端口号绕过nginx直接访问tomcat?

thx~

展开
收起
晓生寒 2018-12-14 15:55:26 1770 0
1 条回答
写回答
取消 提交回答
  • limit_req_zone
    Limit frequency of connections from a client.
    This module allows you to limit the number of requests for a given session, or as a special case, with one address.
    Restriction done using leaky bucket.

    limit_zone
    Limit simultaneous connections from a client.
    This module makes it possible to limit the number of simultaneous connections for the assigned session or as a special case, from one address.
    按照上述nginx官网解释 一个是限制并发连接一个是限制连接频率

    2019-07-17 23:21:04
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《Nginx 代理系统常用手册》 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载