该应用程序在Apache 2.4的端口 81 和Tomcat 8.5的端口 9090 中进行了配置。
网站的工作URL为 http://appname-stg.example.com:81/appname/login 。
我想将其更改为 http://appname-stg.example.com/appname/login
无法成功执行此操作,我应该进行哪些更改?
在Apache目录的 httpd.conf 中的以下行中添加:
ProxyPass /appname http://appname-stg.example.com:81/appname/login timeout=1200 keepalive=On
ProxyReversePass /appname http://appname-stg.example.com:81/appname/login
在Apache目录的 httpd-vhosts.conf 中添加了以下标记:
<VirtualHost *:81>
ServerName appname-stg.example.com
ProxyPass / http://appname-stg.example.com:81/appname/login
ProxyPassReverse / http://appname-stg.example.com:81/appname/login
Redirect Permanent / http://appname-stg.example.com/appname/login
Redirect Permanent /appname http://appname-stg.example.com/appname/login
</VirtualHost>
当我点击“ http://appname-stg.example.com/appname/login”时,该URL会显示:
“服务不可用
HTTP错误503。该服务不可用。”