配置:我有2台虚拟机:
我想做什么:
==>如果用户将输入此网址:https://vm1.com/dashboard
==>该流程将重定向至10.200.200.200:8088
我尝试做什么:
<VirtualHost *:80>
ServerAdmin me@mydomain.com
DocumentRoot /var/www
ProxyPreserveHost On
ProxyRequests Off
ProxyPass /dashboard http://10.200.200.200:8088/
ProxyPassReverse /dashboard http://10.200.200.200:8088/
<Directory /var/www/>
Options +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
问题:
此解决方案仅在传入的URL为/ dashboard时有效。如果传入的URL是/ dashboard / login,则重定向失败。