共计 1193 个字符,预计需要花费 3 分钟才能阅读完成。
打开 Apache 安装目录的 conf 文件夹 (linux 在 /etc/httpd/conf 或者 /usr/local/apache/conf)
打开 httpd.conf
把
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
前面的注释去掉
在 httpd.conf 最后添上
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.linuxidc.com
ServerAlias www.linuxidc.com
ProxyRequests Off
<Proxy http://www.linuxidc.com>
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://61.191.191.4:9002/
ProxyPassReverse / http://61.191.191.4:9002/
</VirtualHost>
<VirtualHost *:80>
ServerName img.linuxidc.com
ServerAlias img.linuxidc.com
ProxyRequests Off
<Proxy http://img.linuxidc.com>
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://61.191.191.4:9003/
ProxyPassReverse / http://61.191.191.4:9003/
</VirtualHost>
CentOS 6.2 编译安装 Squid 配置反向代理服务器 http://www.linuxidc.com/Linux/2012-11/74529.htm
简单配置 Squid 代理和反向代理 http://www.linuxidc.com/Linux/2014-04/99465.htm
RHEL6.4 搭建 Nginx 反向代理服务器 http://www.linuxidc.com/Linux/2014-05/102219.htm
Ubuntu 13.04 安装 LAMP\Vsftpd\Webmin\phpMyAdmin 服务及设置 http://www.linuxidc.com/Linux/2013-06/86250.htm
CentOS 5.9 下编译安装 LAMP(Apache 2.2.44+MySQL 5.6.10+PHP 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm