ubuntu之apache正向代理及反向代理(ProxyPass/ProxyPassReverse)
来源:互联网 发布:域名dns解析服务器 编辑:程序博客网 时间:2024/04/29 21:24
ubuntu之apache正向代理及反向代理(ProxyPass/ProxyPassReverse)
环境是UBUNTU 最新版apache2安装的目录结构有变化网上很多文章都不适用了。
配置
(1)安装proxy组件
a2enmod proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http
(2)修改配置
sudo vim /etc/apache2/mods-enabled/proxy.conf
如果有内容设置则设置如下:
<IfModule mod_proxy.c> #turning ProxyRequests on and allowing proxying from all may allow #spammers to use your proxy to send email. ProxyRequests Off <Proxy *> Order deny,allow Deny from all #Allow from .your_domain.com </Proxy>
(3)修改配置
vim /etc/apache2/sites-enabled/default
<VirtualHost *:80> ... ProxyPass /test/ http://127.0.0.1:3000/ ProxyPassReverse /test/ http://127.0.0.1:3000/ ...</VirtualHost>
重启服务:
sudo service apache2 restart
测试一下试试:
cd ~/wwwroot/testecho hello>index.htmlpython -m SimpleHTTPServer 3000
打开浏览器测试一下吧:)
http://localhost/test
0 0
- ubuntu之apache正向代理及反向代理(ProxyPass\ProxyPassReverse)
- ubuntu之apache正向代理及反向代理(ProxyPass\ProxyPassReverse)
- ubuntu之apache正向代理及反向代理(ProxyPass/ProxyPassReverse)
- 关于ProxyPass、ProxyPassReverse代理和反向代理的理解
- apache 正向代理 反向代理
- Apache 正向代理 反向代理
- Linux上Apache反向代理之ProxyPass IIS网站总结
- 正向代理、反向代理及透明代理
- Apache配置正向代理与反向代理
- Apache配置正向代理与反向代理
- apache配置 virutalhost 正向代理,反向代理
- Apache配置正向代理与反向代理
- Apache配置正向代理与反向代理
- Apache配置正向代理与反向代理
- Apache配置正向代理和反向代理
- Apache配置正向代理与反向代理
- Apache配置正向代理与反向代理
- apache 正向代理与反向代理
- socket 通信——流套接字
- tcp socket keepalive分析
- Maven常用插件
- 程序中的@Override是什么意思?
- mysql 对用户授权的操作
- ubuntu之apache正向代理及反向代理(ProxyPass/ProxyPassReverse)
- C++ Note-Template-01
- yii框架ajax上传
- android 4.4 appcompat gradle 构建jar包兼容性问题
- Otter:connect /192.168.10.225:3306 failure:java.io.IOException: Error When doing Client
- 初始化logback的变量
- 获取验证码显示的两种简单实现,交互绝非偶然~
- javaEE基础面试题
- 关于更高效率做事的一些思考