Linux httpd 跳转简单方法二

使用mod_proxy

这种方法要添加上mod_proxy_http.so

在httpd.conf 中打开httpd-vhost

在 httpd-vhost 里面添加上

<VirtualHost *:80>
    ServerName localhost
    ProxyPreserveHost On
    ProxyRequests Off

    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/

    ErrorLog logs/r.com_error_log
    CustomLog logs/rlog common

</VirtualHost>

重启即可

原文地址:https://www.cnblogs.com/quchengfeng/p/4803229.html