ngrok应用,TomCat 部署项目,不同的项目对应不同的端口号

通过ngrok创建两个通道实现内外网映射,分别访问http://hjwtest.ngrok.cc和http://hjwoa.ngrok.cc。在Tomcat中配置不同端口部署多个项目,用于面试展示DEMO、微信开发调试。详细步骤包括ngrok通道申请、工具运行和server.xml配置。解决端口冲突问题,避免重复项目导致的jar包冲突。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

配置这个不同端口不同项目,是因为本人在结合ngrok这个内外网映射工具的时候

1.ngrok 申请连个通道



2下载ngrok工具,运行bat文件,输入你的通道ID


3 回车 确定,然后访问你的地址;我的是 http://hjwtest.ngrok.cc 和 http://hjwoa.ngrok.cc


4查看效果(免费的 通道 比较慢)




测试 成功

主要用途: 面试时候展示自己DEMO,微信开发调试,自己装B



#下面是完整的tomcat的server.xml 文件


<?xml version='1.0' encoding='utf-8'?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in com
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值