Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Tomcat restricts domain name access to prohibit ip access

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Sometimes I encounter a server website. Can only be accessed through a domain name. Ip access is not allowed. To prevent malicious domain name resolution, tomcat can achieve this simple function.

1. Ip is prohibited from accessing project 2, and only bound domain names are allowed.

Environment: tomcat7 Public Network address: 114.113.100.166 Domain name: binge.com

Open the configuration file of tomcat, server.xml, and find the Engine node and modify it as follows:

Or use your own domain name to bind directly in the server.xml file

In this way, other domain names cannot be accessed even if they point to them.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report