反向代理远端 单台tomcat 使用ip+端口
、环境 nginx 10.1.1.161 公网:123.58.251.166 tomcat 10.1.1.103 、tomcat 配置 [root@host---- ~]# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 127.0.0.1: 0.0.0.0:* LISTEN /redis-server
tcp 0.0.0.0: 0.0.0.0:* LISTEN /sshd
tcp 127.0.0.1: 0.0.0.0:* LISTEN /master
tcp6 ::: :::* LISTEN /java
tcp6 ::: :::* LISTEN /sshd
tcp6 ::: :::* LISTEN /master
tcp6 127.0.0.1: :::* LISTEN /java
tcp6 ::: :::* LISTEN /java
tcp6 ::: :::* LISTEN /mysqld
[root@host---- ~]# curl -I http://127.0.0.1:8080
HTTP/1.1
Content-Type: text/html;charset=UTF-
Transfer-Encoding: chunked
Date: Sun, Aug :: GMT 、 nginx配置 [root@host---- conf.d]# pwd
/etc/nginx/conf.d
[root@host---- conf.d]# ls
test1.conf test2.conf test3.conf [root@host---- conf.d]# cat test3.conf
upstream abc.com {
server 10.1.1.103: ;
#server 127.0.0.1: ;
#ip_hash; } server { listen ;
server_name 127.0.0.1:;
location / {
#反向代理的地址
proxy_pass http://abc.com;
}
} 、访问: [root@host---- ~]# curl http://127.0.0.1:8085 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Apache Tomcat/8.5.</title>
<link href="favicon.ico" rel="icon" type="image/x-icon" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="tomcat.css" rel="stylesheet" type="text/css" />
</head> <body>
<div id="wrapper">
<div id="navigation" class="curved container">
<span id="nav-home"><a href="http://tomcat.apache.org/">Home</a></span>
<span id="nav-hosts"><a href="/docs/">Documentation</a></span>
<span id="nav-config"><a href="/docs/config/">Configuration</a></span>
<span id="nav-examples"><a href="/examples/">Examples</a></span>
<span id="nav-wiki"><a href="http://wiki.apache.org/tomcat/FrontPage">Wiki</a></span>
<span id="nav-lists"><a href="http://tomcat.apache.org/lists.html">Mailing Lists</a></span>
<span id="nav-help"><a href="http://tomcat.apache.org/findhelp.html">Find Help</a></span>
<br class="separator" />
</div>
<div id="asf-box">
<h1>Apache Tomcat/8.5.</h1>
</div>
<div id="upper" class="curved container">
<div id="congrats" class="curved container">
<h2>If you're seeing this, you've successfully installed Tomcat. Congratulations!</h2>
</div>
<div id="notice">
<img src="tomcat.png" alt="[tomcat logo]" />
<div id="tasks">
<h3>Recommended Reading:</h3>
<h4><a href="/docs/security-howto.html">Security Considerations HOW-TO</a></h4>
<h4><a href="/docs/manager-howto.html">Manager Application HOW-TO</a></h4>
<h4><a href="/docs/cluster-howto.html">Clustering/Session Replication HOW-TO</a></h4>
</div>
</div>
反向代理远端 单台tomcat 使用ip+端口的更多相关文章
- 反向代理远端 单台tomcat 使用域名代理
.环境 nginx 10.1.1.161 公网:123.58.251.166 tomcat 10.1.1.103 .远端tomcat 配置 [root@host---- ~]# netstat -tn ...
- nginx反向代理本地 单台wed -使用ip+端口代理
环境: 本地外网ip:123.58.251.166 .配置index.html网页 [root@host---- conf.d]# cat /web/sing/index.html <h1> ...
- nginx反向代理本地 单台wed -使用域名代理
环境: 本地外网ip:123.58.251.166 .配置index.html网页 [root@host---- conf.d]# cat /web/sing/index.html <h1> ...
- [转]用apache反向代理解决单外网ip对应内网多个web主机的问题
用apache反向代理解决单外网ip对应内网多个web主机的问题 转载一个有独立外网IP,需内网服务器对外发布的例子,是应用apache虚拟主机的. 来源地址:http://www.itshantou ...
- Apache 2.4.7在CentOS6.4中安装配置反向代理解决单外网IP对应多个内网主机的方法实践
欢迎转载,转载时请保留全文及出处. Apache 2.4.7在CentOS6.4中安装配置反向代理解决单外网IP对应多个内网主机的方法实践 Apache安装 下载源程序(http://httpd.ap ...
- 使用nginx反向代理到不同服务器(共享同一端口)配置文件
使用nginx反向代理到不同服务器(共享同一端口)配置文件 https://blog.csdn.net/wang_k_123/article/details/72779443 https://www. ...
- nginx反向代理本地 两台web负载均衡 使用ip+端口代理
环境: 本地外网ip:123.58.251.166 .配置index.html网页 [root@host---- conf.d]# cat /web/sing/index.html <h1> ...
- 使用Nginx实现反向代理过程(一台服务器部署两个网站)
正向代理指的是客户端的 反向代理指的是服务端的 需要实现的反向代理: 1.首先使用SwitchHosts配置不同域名,如下:(SwitchHosts软件在上一篇博客有链接) 2.在Linux上部署两台 ...
- NGINX反向代理,后端服务器获取真实IP
一般使用中间件做一个反向代理后,后端的web服务器是无法获取到真实的IP地址. 但是生产上,这又是不允许的,那么怎么解决? 1.在NGINX反向代理服务器上进行修改 2.修改后端web服务器配置文件 ...
随机推荐
- synchronized 和 volatile 的区别是什么?(未完成)
synchronized 和 volatile 的区别是什么?(未完成)
- 多线程 multiprocessing 的几个小例子
1.Pipe import multiprocessing as multip,time from multiprocessing import Process,Pipe,Event,Conditio ...
- 从c到c++<一>
逻辑型也称布尔型,其取值为true(逻辑真)和false(逻辑假),存储字节数在不同编译系统中可能有所不同,VC++中为1个字节. 声明方式: bool result; result=true; 可以 ...
- 单元测试框架之unittest(四)
一.摘要 假设我们有一组测试方法差别非常小,比如仅仅是所需要的参数有少许变化时,我们的自动化测试如何进行?unittest框架为这种场景提供了一种方式,它允许我们用subTest()上下文管理器在一个 ...
- python_并发编程——进程池
1.进程池 from multiprocessing import Pool def func(n): for i in range(10): print(n+1) if __name__ == '_ ...
- 2019牛客多校C Governing sand——桶&&思维题
题意 有 $n$ 种树,每种树都有高度 $H_i$,费用 $C_i$,数量 $P_i$,现要砍掉一些树,使得剩下的树中最高的树的数量超过一般,求最小的费用.($1 \leq n \leq 10^5, ...
- 【题解】Mountain Walking-C++
题目题意翻译题意简述:现在给一个N*N的矩阵,找一条路径从左上角走到右下角,每次可以向上下左右四个方向中某个方向走.要求走过的点中,数字最大的减去最小的.要求值越小越好.现在就是要求这个值. 输入格式 ...
- 002_89C52_Proteus_DAC0832_输出50HZ,正弦波,三角波,矩形波,锯齿波
(一)非常感谢:89C51与ad0832 输出正弦波,三角波,矩形波,锯齿波 (二)在上面的情况下进行程序的修改,实现50HZ的输出 (三)电路图 (三)输出方波 (四)输出锯齿波 (五)输出三角波 ...
- CF D. Ehab and the Expected XOR Problem 贪心+位运算
题中只有两个条件:任意区间异或值不等于0或m. 如果只考虑区间异或值不等于 0,则任意两个前缀异或值不能相等. 而除了不能相等之外,还需保证不能出现任意两个前缀异或值不等于m. 即 $xor[i]$^ ...
- centos7初始化脚本(转)
#!/bin/bash # 描述: CentOS 初始化脚本 # 加载配置文件 if [ -n "${1}" ];then /bin/} fi # 可接受配置(shell 变量格式 ...