1、找到apache安装文件夹下的conf/httpd.conf
找到并取消掉下列这几行的#(取消注释)
LoadModule proxy_module modules/mod_proxy.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
Include conf/extra/httpd-vhosts.conf
2、配置conf/extra/httpd-vhost.conf文件
<VirtualHost *:80>
ServerName www.abc.com(浏览器访问时输入的域名)
ProxyPass / http://localhost:8080/ (转发到的地址)
ProxyPassReverse / http://localhost:8080/(转发到的地址)
ErrorLog "logs/test.shelwee.com.log"
CustomLog "logs/test.shelwee.com.log" combined
</VirtualHost>
3、重启apache并启动tomcat
4、测试:浏览器输入www.abc.com,出现如下界面代表配置成功: