初识HTTP协议(8)---反向代理
程序员文章站
2024-02-08 18:10:16
...
启用反向代理
ProxyPass "/" "http://www.example.com/"
ProxyPassReverse "/" "http://www.example.com/"
#10.0.0.17配置反向代理,www.y.com在10.0.0.8httpd服务器上,并且配置了重定向
<VirtualHost *>
ProxyPass / http://www.y.com/
ProxyPassReverse / http://www.y.com/
</VirtualHost>
[[email protected] mysql]#curl 10.0.0.17
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>307 Temporary Redirect</title>
</head><body>
<h1>Temporary Redirect</h1>
<p>The document has moved <a href="https://www.y.com/">here</a>.</p>
</body></html>