tomcat设置IP地址或者域名访问

spring mvc+maven+tomcat+浏览器服务请求,页面跳转 基于IntelliJ IDEA,spring mvc,maven,tomcat,实现了web下,用三种方式来访问某个页面,以及页面之间的跳转 立即下载

tomcat设置IP地址或者域名访问

参照百度经验来,但是他的有一个路径是有问题的。

找到tomcat的主目录,进入conf文件夹,找到serve.xml,打开

这里写图片描述

修改tomcat的监听端口为80端口:
在server.xml文件中找到:

<Connector port="8080" protocol="HTTP/1.1"               connectionTimeout="20000" redirectPort="8443" />

修改成:

<Connector port="80" protocol="HTTP/1.1"               connectionTimeout="20000" redirectPort="8443" />

这里写图片描述

在server.xml文件中找到:

<Host name="localhost"  appBase="webapps"            unpackWARs="true" autoDeploy="true">

localhost 替换成你想修改的IP地址或者域名地址。在<host></host>标签中间,添加如下内容:

<Context path="" docBase="项目名"/>

说明:docBase的值也可以是绝对路径。
如图,是我修改后的配置:

这里写图片描述

这个项目直接在webapps下,并且删掉ROOT。

如果是域名,在云服务器管理台绑定域名之后

第一是

<Engine defaultHost="localhost" name="Catalina">  
把defaultHost的值修改成你的域名<Engine defaultHost="www.test.com" name="Catalina">

第二是

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
把name的值修改成你的域名  
<Host appBase="webapps" autoDeploy="true" name="www.test.com" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">

就ok了,就可以通过域名来访问你部署的项目了。

手把手教你用P-MOS管搭建双电源自动切换电路(含AO3401选型指南) 本文提供了一份基于P-MOS管AO3401构建高可靠双电源自动切换电路的实战指南。文章详细对比了继电器、理想二极管与MOS管方案的优劣,深入解析了AO3401的关键参数选型,并手把手指导了从原理图设计、PCB布局到上电调试的全过程,旨在帮助硬件工程师和创客以极低成本实现无缝、高效的电源冗余方案。 阅读详情

相关推荐

QGroundControl实现多机控制

前言 作为西安电子科技大学的本科生一名,目前在研究关于无人机导航规划与轨迹控制方面。 目前在跟导师做关于雷达无人机的一个项目,在这里记录一下关于QGC地面站实现多机控制的一些方法。 某些地方写的可能不是很完善,欢迎大家补充。 目前该文章还未写完,后期本人会继续编写 多机控制原理 多机地面站支持TCP,UDP和串口等三种连接方式,首先我们需要对这两种连接方式抽象出一个基类LinkInterface,提供两个虚函数分别对应于数据接受和发送处理,针对于不同的连接方式实现TCP,UDP和串口连接相对应的子类TCPL

Phillweston的博客 8428

Tomcat配置域名访问

1、打开Tomcat安装目录下的/conf/server.xml文件 2、在server.xml中将原有的<Host name=“localhost“ appBase=“webapps“ ……>修改为<Host name=“www.test.cn“ appBase=“webapps“……>,name后面可以填IP也可以是域名。 3、最终我们要在本地访问域名,因无域名解析服务器,所以在hosts上配,来模拟dns解析。还得修改相关HOST文件。。打开C:/WINDOWS/syste

wqqqianqian的博客 5512

人形机器人解耦驱动腿部设计与FAST性能优化

机器人运动控制的核心在于动力学解耦与能量效率优化。通过多连杆机构设计,可以实现关节运动的独立控制,显著降低惯性叠加和能量损耗。DecARt Leg采用创新的齿轮-四杆复合机构,将腿部伸缩与摆动运动完全解耦,配合多杆踝关节传动系统,实测行走速度可达4.18m/s。这种解耦设计不仅提升了动态性能,其提出的FAST指标更为腿部构型提供了量化评估基准,在仓储物流、地形适应等场景展现出显著优势,为人形机器人运动控制提供了新的技术路径。

weixin_33759613的博客 238

tomcat如何配置域名访问

tomcat配置域名

shenyuwuxin的博客 2127

01-系统技术架构师必备——软件架构设计基础与核心概念

摘要 本文系统阐述了软件架构设计的核心概念与方法论,重点涵盖以下内容:1)软件架构的四大要素(构件、连接件、约束、配置)及其边界划分;2)Garlan & Shaw五大架构风格(数据流、调用/返回、独立构件、虚拟机、仓库)的典型应用场景;3)基于电商库存系统的架构选型实战案例,展示如何根据业务需求(高并发、最终一致性)选择事件驱动架构配合Saga模式;4)介绍ABSD、DSSA等主流架构方法论及ISO/IEEE标准体系。文章融合金融与互联网领域的架构实践经验,为技术架构师提供系统性的知识框架和决策参考。

模界 | AI工程化实践者 182

【WRF-Chem教程-附录B】使用 MOZART 与WRF-Chem

使用MOZART与WRF-Chem

WW、forever的博客 242

tomcat配置通过域名直接访问项目首页的完整步骤

第六步:在</Host>标签前添加<Context docBase="ctools" path="" reloadable="true" />。我的域名为:www.ctools.top,也欢迎大家访问。第三步:将tomcat访问端口号更改为 80,更改后可以通过访问www.ctools.top 查看是否访问到猫的界面。第二步,将index.html设置项目的默认首页,修改项目的web.xml文件。第五步:更改<Host></Host>标签下的name值为访问的域名。15 篇文章0 订阅。

jacob的专栏 1982

YOLO26科研升级:OREPA在线重参数化,让模型精度在训练中持续跃升

在目录下,新建AddModules文件夹,将orepa.py放入其中。

LXY_LOVE36的博客 98

Tomcat设置IP地址或者域名访问

好记忆不如按烂笔头,记下点东西,总是有点用处的, Tomcat  服务的启动和停止就不用说了,就说说怎么样使用域名的方式来访问 tomcat 服务吧。 对于早就习惯使用:localhost:8080/myweb 访问程序的coder来说,www.100csc.com 显得略有大气,那么如何实现 Tomcat 的域名访问呢? 前提是:编译好的工程已经在 tomcat/webap

JuncaiLiao的专栏 2406

已经下载了WSL2但Docker依然显示版本过旧无法使用,如何解决?

🏆本文收录于 《全栈Bug调优(实战版)》 专栏,该专栏专注于分享我在真实项目开发中遇到的各类疑难Bug及其深层成因,并系统提供高效、可复现的解决思路和实操方案。无论你是刚入行的新手开发者,还是拥有多年项目经验的资深工程师,本专栏都将为你提供一条系统化、高质量的问题排查与优化路径,助力你加速成长,攻克技术壁垒,迈向技术价值最大化与职业发展的更高峰🚀!

**My Coding Family** 2906

RK3588 MPP,RGA,DRM,QT之RGA

RK3588多路视频采用RGA来进行混合成一帧

dreamliweiming的博客 4265

系统实施系列之tomcat设置IP地址或者域名访问

本文介绍如何通过修改tomcat的配置,实现通过IP地址或者域名直接访问tomcat中应用。 工具/原料 tomcat(以tomcat7.0.50为例) 方法/步骤 1 找到tomcat的主目录,进入conf文件夹,找到server.xml文件,并打开: 步骤阅读 2 修改tomcat的监听端口...

a18826265589的博客 295

Go语言全面解析:从入门到精通

Go语言是由Google开发的一种静态类型、编译型编程语言,具有简洁、高效、安全的特点。它特别适合高并发服务、云原生应用和网络编程等场景。Go采用Goroutine和Channel实现轻量级并发,性能接近C/C++。与其他语言相比,Go语法更简洁但类型更严格,编译速度快且跨平台支持好。虽然Go支持多种设计模式和编程范式,但其面向对象实现方式与传统语言不同。标准库丰富且拥有Gin、GORM等企业级框架。核心语法包括包管理、变量声明、函数定义、流程控制等,适合构建高性能后端服务和系统工具。

博哥哥的博客 4925

Tomcat域名或IP地址访问方式配置方法

<br />1、配置www.***.com域名方式访问<br /> 在Tomcat下面配置域名(如:www.***.com)的时候,同时又不希望客户通过我们网站的IP或者域名访问到Tomcat默认的ROOT,配制方法如下:<br />   1、打开Tomcat安装目录下的/conf/server.xml文件<br />   2、在server.xml中将原有的<Host name=“localhost“ appBase=“webapps“ ……>修改为<Host name=“您要配置的域名“ appB

1万+

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

tomcat设置只允许域名访问,不允许IP访问

1、/conf/server.xml搜索Engine节点,将defaultHost换成域名 2、搜索Host节点,将原配置换成下图 <Host name="ygxf.jssxfj.jiangsu.gov.cn" appBase="webapps" unpackWARs="true" autoDeploy="true" ...

zhang8907xiaoyue的博客 1万+

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

Tomcat8限制指定域名或者IP访问

环境:  Tomcat8.0.53目标:  设置为使用指定的域名或者IP访问 1. 设置IP访问 1.1 找到以下信息 <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> 1.2 修改 name="localhost" 中的 "localhost" 为指定的IP,修改内容如...

weixin_34198762的博客 652

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: mysql数据库客户端访问权限配置
下一篇: SpringMVC 中 数据格式化
杜鲁门
博客等级 码龄11年 219粉丝 316原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值