6.4 Apache 部署
最后更新于:2022-04-02 06:15:12
[TOC]
# Apache 配置
apache 和 nginx 的实现原理一样,都是做一个反向代理,把请求向后端传递,配置如下所示:
```
NameVirtualHost *:80
ServerAdmin webmaster@dummy-host.example.com
ServerName www.a.com
ProxyRequests Off
Order deny,allow
Allow from all
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ServerAdmin webmaster@dummy-host.example.com
ServerName www.b.com
ProxyRequests Off
Order deny,allow
Allow from all
ProxyPass / http://127.0.0.1:8081/
ProxyPassReverse / http://127.0.0.1:8081/
```
';