【 Ngnix 】配置路径转发至后端Apache多台虚拟主机
一、安装apache并开启端口
[root@server ~]# netstat -ntplu | grep httpd
tcp 0.0.0.0: 0.0.0.0:* LISTEN /httpd
tcp 0.0.0.0: 0.0.0.0:* LISTEN /httpd
二、nginx配置
location ^~ // {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
location ^~ // {
proxy_pass http://127.0.0.1:8000/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWQAAABsCAIAAADSXV+uAAAITUlEQVR4nO3dP27iShzAcR/BV7A4wZ7BBUX6nGAa2ogDPLlLR7pN4wJphYSo6ExrUe2CFGqQ6NP5Au8VP+3vTcaOGSfj8CffT8Uzxnj3eb6xB7KOqvdFUdTyrP9qeZ5nWVZVVZZleZ7r8iRJnDWzLCuKor4FXTNN0yzLoiiKoki2WVWVMUY2WxRFmqYtG0zTdLfb1bevryqKQjdb3+HvZrvd3t3d3d3dbbfbrq/9c8o/b93f39/f3zsLT24EX6ltnAePRVEUOuzzPHdeaIyxB6pNX2U3Ik1TDUGSJFEUnaxPYyzsQBALJaXYbrf6oNPLux6I1OHyfWksqr+NiKLIGGOfBURR1DIstQJ2DnRgJ0kiCdjtds7O+MTCGKMLiYVwAvGBXnQ9EInF5fvqWKjdbiexqI/wupZYFEVhjNGFTh2ct66felTWNYi9V/pU42XLbWtMQ9dedD0QicXlOxGL1MPHYpEkiYzq9+YpnJXlQZZluinZgtOaKIqc4a3P2q9t2Te9uqnPgHwTDw8PjVHYbrcPDw+eG+l6IBKLy9c2zgtv7ceNDkgZ2EJfZYyJLDI+nYsU+4xA8mRfthRFoS/XmU6thj6rG8yyTDdojKnvv26t/c+FFl0PRGJx+RgP6MW5D2yERyzQi3Mf2AiPWKAX5z6w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CbaBmz6Hy2/sOui4X98AAAAAElFTkSuQmCC" alt="" />
【 Ngnix 】配置路径转发至后端Apache多台虚拟主机的更多相关文章
- Apache HTTP Server 虚拟主机配置
Apache HTTP Server 虚拟主机配置(三) 什么是虚拟主机 "虚拟主机"是指在一个机器上运行多个网站(比如:www.company1.com 和 www.c ...
- Centos 7 环境下,如何使用 Apache 实现 SSL 虚拟主机 双向认证 的详细教程:
1. testing ! ... 1 1 原文参考链接: http://showerlee.blog.51cto.com/2047005/1266712 很久没有更新LAMP的相关文档了,刚好最近单位 ...
- 在Apache中开启虚拟主机
最近在自学LAMP,在Apache中尝试着开启虚拟主机的时候,遇到了挺多麻烦的,这里也顺便总结一下,在Apache中开启虚拟主机的时候,主要有下面几个步骤: 1.新建一个文件夹作为虚拟主机,用来存储网 ...
- Nginx 和Apache 中的虚拟主机的概念
在部署环境的时候,有时候会引用到虚拟主机的概念,什么是虚拟主机呢,博主之前一直把虚拟主机的概念没搞清楚,导致在部署的时候,一直动不动就404 ,或者500,或者服务器不通 所以,什么是虚拟主机呢? 虚 ...
- Apache之——多虚拟主机多站点配置的两种实现方案
Apache中配置多主机多站点,可以通过两种方式实现: 将同一个域名的不同端口映射到不同的虚拟主机,不同端口映射到不同的站点: 将同一个端口映射成不同的域名,不同的域名映射到不同的站点. 我们只需要修 ...
- Apache 2.4虚拟主机配置
托管它指的是多个站点的执行一台机器上 (例如 company1.example.com 和 company2.example.com) . 机能够"基于 IP",即每一个 IP 一 ...
- 【原创】Apache和基于虚拟主机的Tomcat集群方案
最近建设了北京某政府机构的网站,网站前段使用Apache做负载均衡,后端使用Tomcat做的集群,基于虚拟主机的方式访问,并且实现了静态资源和动态资源的分离. 开始的建设方案有两种,一种是使用apac ...
- 关于wamp5中(apache)设置虚拟主机
找了很多文章,但是很多对于最新的apache都已经过时无法生效了. http://blog.csdn.net/yuluo727282752/article/details/6944359 这篇文章写得 ...
- Apache实现动态虚拟主机
经常在开发中为Apache web server添加虚拟主机 方便多个项目的 同时运营,但是每次增加新的项目时都得重新配置增加VirtualHost:虚拟主机 部分,时间久了VirtualHo ...
随机推荐
- Uuuuuunity
foreach http://blog.csdn.net/byondocean/article/details/6871881 yield http://www.cnblogs.com/CareyS ...
- 使用Microsoft EnterpriseLibrary(微软企业库)日志组件把系统日志写入数据库和xml文件
这里只是说明在项目中如何配置使用微软企业库的日志组件,对数据库方面的配置请参考其他资料. 1.在项目中添加Microsoft.Practices.EnterpriseLibrary.Data.dll. ...
- Packet filtering with Linux & NAT
http://www.linuxfocus.org/ChineseGB/May2003/article289.shtml Gateway, Proxy-Arp 和 Ethernet Bridge ? ...
- 2017Nowcoder Girl初赛重现赛
https://ac.nowcoder.com/acm/contest/315#question A.平方数 代码: #include <bits/stdc++.h> using name ...
- CentOS7中rpm,yum软件安装命令
RPM包常用安装位置说明 /etc/ 配置文件安装目录 /usr/bin/ 可执行的命令安装目录 /usr/lib/ ...
- thrift的lua
thrift的lua实现 最近要进行系统升级,后台的数据是根据城市区分的.担心新系统的稳定性及新数据的准确性,计划部分城市采用新接口.接口的入参里没有城市信息,只有经纬度坐标,需要调用一个thrift ...
- 猜数字(C语言版)
编程先由计算机“想”一个1到100之间的数请人猜,如果人猜对了,则结束游戏,并在屏幕上输出人猜了多少次才猜对此数,以此来反映猜数者“猜”的水平,否则计算机给出提示,告诉人所猜的数是太大还是太小,最多可 ...
- line-height用法总结
Line-height是前端用语,经常被前端开发人员经常使用. line-height设置1.5和150%有什么区别?这是一个比较常见的前端面试题. 定义: line-height指的是文本行基线间的 ...
- [洛谷P3865]【模板】ST表
题目大意:区间静态最大值 题解:ST表,zkw线段树 ST表: st[i][j]存[i,i+$j^{2}$-1]的最大值,查询时把区间分成两个长度相同的小区间(可重复) #include<cst ...
- WPS是个坑
WPS2016 10.1.0.5740 存储的EXCEL表格文件,用PHP mime_content_type函数获取到的mime类型是“application/zip”