Tomcat虚拟主机配置方案(域名解析)For Windows/Linux(最完全版)

tomcat配置虚拟目录,外加域名解析 NULL 博文链接:https://lijun0349-163-com.iteye.com/blog/1818950 立即下载

在网上找了半天也没找到相关的资料,都说的太含糊.
本人对tomcat下配置 一ip对多域名的方法详细如下,按下面配置一定能成功,经过测试了.

<Host name="localhost" debug="0" appBase="D://Tomcat 5.0//webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
       <Alias>localhost.com</Alias> 
       <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
            timestamp="true"/>
        <Context path="" docBase="D://Tomcat 5.0//webapps//gg"  reloadable="true" caseSensitive="false" debug="0"></Context>
</Host>

<Host name="one.localhost" debug="0" appBase="D://Tomcat 5.0//webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
       <Alias>one.localhost.com</Alias> 
       <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
            timestamp="true"/>
       <Context path="" docBase="D://Tomcat 5.0//webapps//kk//a"  reloadable="true" caseSensitive="false" debug="0"></Context>
</Host>

<Host name="two.localhost" debug="0" appBase="D://Tomcat 5.0//webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
       <Alias>two.localhost.com</Alias> 
       <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
            timestamp="true"/>
        <Context path="" docBase="D://Tomcat 5.0//webapps//kk//b"  reloadable="true" caseSensitive="false" debug="0"></Context>
</Host>

因无域名解析服务器,所以在hosts上配,来模拟dns解析.

10.1.1.241  localhost           指向gg文件夹
10.1.1.241  localhost.com       指向gg文件夹
10.1.1.241  one.localhost       指向a文件夹
10.1.1.241  one.localhost.com   指向a文件夹
10.1.1.241  two.localhost       指向b文件夹
10.1.1.241  two.localhost.com   指向b文件夹

经过多方面尝试,终于在tomcat下配置成功了.

 

修改默认的应用时:改defaulthost,并将context的path置为空。

 

 

配置多个应用时:

如:http://localhost:8080/

        http://localhost:8080/first

        http://localhost:8080/second

对应的配置如下:

<Host name="localhost" debug="0" appBase="D://Tomcat 5.0//webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
       <Alias>localhost.com</Alias> 
       <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
            timestamp="true"/>
        <Context path="" docBase="D://Tomcat 5.0//webapps//Root"  reloadable="true" caseSensitive="false" debug="0"></Context>

        <Context path="/first" docBase="D://Tomcat 5.0//webapps//first"  reloadable="true" caseSensitive="false" debug="0"></Context>
        <Context path="/second" docBase="D://Tomcat 5.0//webapps//second"  reloadable="true" caseSensitive="false" debug="0"></Context>

</Host>

Codex CLI 手机号验证失败?5 种接码平台实测对比与绕过地区限制的 3 步操作 揭示 Codex CLI 手机号验证失败的真实原因在于上下文污染而非网络问题,分析其通过 ASN、Accept-Language 和 TLS SNI 三重加权风控的机制,并实测对比 5 种接码平台在 DNS 解析路径、ASN 干净度和复用间隔上的差异,提出剥离浏览器指纹、固化 TLS SNI、隔离 阅读详情

相关推荐

【笔记6】SP3485自动收发电路设计分析

则TXD路为1,MOS管导通,2/3引脚为0,芯片实际上事与愿违的进入了接收模式。但是,由于我们采用单根双绞线与上位机通信,在数据发出去前数据线上没有任何信号传输,所以AB处于高阻态,进而受到R1下拉与R2上拉的影响,差分信号为1,所以输出1;此外,RXD内路也被上拉,485总线B端上拉,A端下拉。此时TXD由于没有数据传输,所以一直处于1的状态,因而MOS管导通,2/3引脚为0,芯片处于正常接收状态。总而言之就是,RE#与 DE只能有一个是1,1代表微控制器向外发送,0代表微控制器接收。

Haytham233的博客 3146

云服务器安装Tomcat并设置域名解析

一、操作环境 二、安装Tomcat服务器 1.上传并解压压缩包 2.配置Java环境 3.启动Tomcat服务 三、设置域名解析

We choose to go to the moon in this decade and do the other things, not because they are easy, but beacase they are hard. 1578

YOLOv8实战:5分钟搞定Windows环境下的目标检测模型部署(附常见报错解决方案)

本文详细介绍了在Windows环境下快速部署YOLOv8目标检测模型的实战指南,包括环境配置、模型加载、快速验证及常见报错解决方案。通过5分钟快速入门教程,帮助开发者高效实现计算机视觉应用,特别适合需要快速上手的AI开发者。

weixin_30566063的博客 557

tomcat 配置域名解析,亲测

tomcat配置域名解析,亲测 前情提要:准备用阿里云上的 tomcat 部署项目,需要配置tomcat的域名解析,以达到直接输入域名访问项目的目的 首先,让用户输入8080端口显然不合理,因此需要改8080端口为 http 默认80端口。 编辑 tomcat 目录下的 conf 文件夹中的 server.xml ,可以先备份以备不时之需 <!--原本这里为 8080--> <Connector port="80" protocol="HTTP/1.1" conne

路先生的杂货铺,学习总结+好文分享 4634

Android车载应用开发与分析(11)- 车载Android应用开发入门指南

将时间回退到2017年我大学刚毕业时,彼时移动互联网就已经开始退潮,各大个培训机构也纷纷停止了Android相关的培训,曾经热火朝天的应用开发从那时起,就开始走向下坡路,小程序以及众多跨平台框架也让市场对Android原生开发的需求逐年降低,市场需求的降低也造就了Android开发的面试变得史无前例的“卷”。 终于我在2019年选择离开了互联网,投身当时还不是非常火热的车载Android领域继续从事Android原生开发。而这一年中国首个外商独资的整车制造项目,“...

linkwj的博客 1万+

AutoDock Vina 对接计算(大批量)

AutoDock Vina是一种用于计算生物分子之间相互作用的计算工具,主要用于蛋白质和小分子(通常是潜在药物分子)之间的对接研究。它可以用于虚拟筛选、药物设计和生物分子结合位点的预测等多个应用领域。

MurphyStar的博客 1万+

Tomcat 中配置域名

1.配置文件server.xml <Host name="www.fx.com" appBase="/var/www.html"> <Context path="" docBase="/var/www/html/fxl"/> </Host> <Host name="www.ffx.com" appBase="/var/www.html"> <Context path="" docBase="/var/www/html/fx2"/> ...

I0xiao0I的博客 1980

别再只用串口助手了!用LabVIEW给STM32F103C8T6做个专属上位机(附完整源码)

本文详细介绍了如何利用LabVIEW为STM32F103C8T6开发定制化上位机,替代传统串口助手,实现高效数据交互。内容涵盖硬件架构设计、STM32固件优化、LabVIEW上位机开发技巧及工业级应用案例,特别适合需要实时数据采集与处理的工控场景。

weixin_42524762的博客 368

tomcat配置,通过域名访问指定项目

有时候为了方便及面子都会为自己的项目或者服务器指定域名映射,这样不仅容易记忆,也方便传播。     找了很多资料都比较模糊,特整理出来,为了方便后者查询、学习。     本文知识一种配置方式,若有简单方式欢迎留言,本文持续更新。     默认域名、服务器、项目等条件已具备。

Zhiyuan_Ma 1万+

【王道训练营 C/C++方向基础 60 题(31-40)】

王道训练营 C/C++方向基础 60 题(31-40)

qq_55805517的博客 3067

iverilog+GTKwave使用总结

iverilog是一个开源的硬件描述语言(HDL)仿真工具,用于对硬件描述语言(如Verilog)编写的数字电路进行仿真。它可以将Verilog代码编译为仿真模型,并通过仿真运行来验证设计的正确性。iverilog支持IEEE 1364-2005 Verilog语言标准,并提供了丰富的功能,包括对多种Verilog语言特性的支持、模块化设计、测试平台等。它还可以与其他工具(如GTKWave波形查看器)配合使用,以便进行仿真后的波形查看和分析。

争取早日成为硅农 2万+

配置apache + tomcat 绑定泛域名

前段时间,写了关于如何将Apache与tomcat整合起来一起提供服务,Apache提供静态网页的访问支持,tomcat则提供动态页面如jsp,servlet的支持能力。这几天有一个同仁在邮件里面问我关于如何配置apache + tomcat 绑定泛域名,这几天也考完试了,所以就整理整理了思维,开始解决这个问题。在解决之前,需要对几个概念作一些解释:什么是泛域名比如说你有一个域名:yuan.hus

袁伟民(Antitest)的专栏 4115

Uniapp返回上一页并刷新:亲测有效的 goBack 实现技巧!

这个技巧在实际开发中非常常用,特别适合表单提交后返回列表刷新这类场景。比起依赖onShow或复杂的vuex状态同步,这种方式更直接、好维护,也不容易出 bug。

代码简单说 Vue、JAVA、PHP、Node.js 熟练运用,接口、架构、性能全搞定。 1843

Linux/windows下Tomcat虚拟主机的配置实例

Linux/windows下Tomcat虚拟主机的配置实例 *注:本文整理自网络 一、打开tomcat安装目录下conf/server.xml这个文件     在server.xml文档中找到   接着添加上面添加以下内容(暂时先说分为四种方式): 第一种: <Logger className="org.apache.catali

Spring Boot-Common On With You 730

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

深度学习工具包 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")

Tomcat虚拟主机配置方案(域名解析)For Windows/Linux

<br /> <br />一、打开tomcat安装目录下conf/server.xml这个文件<br />        在server.xml文档中找到<br /></Engine><br /></Service> <br />接着添加上面添加以下内容(暂时先说分为三种方式):<br />第一种:<br />     <Host name="www.haokan946.cn" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true" x

点点滴滴,终汇一海! 568

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

tomcat配置文件路径linux,Tomcat目录结构以及配置文件说明

安装包tar.gz文件时Linux操作系统下的安装版本exe文件时Windows系统下的安装版本zip文件是Windows系统下的压缩版本TOMCAT的目录结构/bin:存放windows或Linux平台上启动和关闭Tomcat的脚本文件/conf:存放Tomcat服务器的各种全局配置文件,其中最重要的是server.xml和web.xml/doc:存放Tomcat文档/server:包含三个子目...

weixin_39902875的博客 2822

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

Tomcat的Server.xml虚拟主机和虚拟目录的配置

文章目录1 server.xml虚拟主机和虚拟目录1.1 修改端口1.2 增加虚拟目录1.2.1 最简单的方式1.2.2 自定义1.3 增加虚拟主机1.3.1 修改hosts文件,增加主机名1.3.2 修改配置文件1.3.3 目录设置1.4 其它问题1.5 server.xml文件 1 server.xml虚拟主机和虚拟目录 以前开发JavaEE网站都布置在Tomcat下,布置目录一般为$CATA...

上善若泪 1138

tomcat的虚拟主机的配置

Tomcat虚拟主机配置方案(域名解析)For Windows/Linux(最完全版) 一、打开tomcat安装目录下conf/server.xml这个文件 在server.xml文档中找到   接着添加上面添加以下内容(暂时先说分为三种方式): 第一种: <Logger className="org.apache.catalina.logger.Fi

欢迎光临1st灬伪装的博客 552
上一篇: Linux的目录含义
下一篇: Tomcat虚拟主机配置方案(域名解析)For Windows/Linux(最完全版)
hulefei29
博客等级 码龄19年 61粉丝 573原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值