我需要指出domain.com/chat到chat.domain.com。因此,当我访问domain.com/chat我希望看到与访问时相同的内容chat.domain.com。
我的虚拟主机如下所示。如您所见,我曾尝试使用 proxypass 执行此操作,但我认为我做错了什么。
ServerAdmin [email protected]
DocumentRoot /var/www/domain.com
ServerName domain.com
ErrorLog /var/log/apache2/domain.com-error_log
CustomLog /var/log/apache2/domain.com-access_log combined
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /chat http://chat.domain.com/chat
ProxyPassReverse /chat http://chat.domain.com/chat
<Location /chat>
Order allow,deny
Allow from all
</Location>
<Location />
Order allow,deny
Allow from all
</Location>
<Directory /var/www/domain.com>
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>