Apache2redirect到另一台本地服务器

我在本地的纽卡尔有两个Web服务器:

192.168.1.1 – > main apache2 192.168.1.2 – > secondary apache2

所有的http请求都进入端口80到.1我如何创build一个虚拟主机设置来redirect一个子域(比如lights.example.com)到服务器.2?

现在我有这个:

<VirtualHost *:80> ServerName lights.example.com RewriteEngine On RewriteRule ^(.*)$ http://192.168.1.2$1 [P] </VirtualHost> 

但是当我浏览到lights.example.com我得到一个403:

您无权访问/在此服务器上。

从我的主服务器,但直接浏览我的二手作品罚款。

谢谢! 纳特

我们使用apache来“代理”请求。 这可能是有用的?

 <VirtualHost *:80> ServerAdmin [email protected] ServerName application.test.example.com # if not specified, the global error log is used ErrorLog /var/log/apache2/application.error.log CustomLog /var/log/apache2/application.access.log combined HostnameLookups Off UseCanonicalName On ServerSignature On ProxyPass / http://forwardedserver.internal/ ProxyPassReverse / http://forwardedserver.internal/ </VirtualHost>