Dispatcher configuration with virtualhost issue on port appending
Hi,
I'm trying to setup a new publish instance in aws linux machine. I have setup the aem publish environment and trying to access via the hostname.
So the Request flow is Dispatcher server -> ALB (Protocol port: 7000) -> AEM Publisher Server (App Instance running on 7000)
I have setup all the dispatcher configurations and routing the traffic through renders to the ALB on port 7000
When i access the host url lets say aempublish.com it's going to aempublish.com:7000/content/we-retail.html where the page is not loading. If i manually remove the port and hit url the page loads fine. I have setup the proxy and rewrite rules as well but still facing the same issue.
Checking the network the request is getting redirected twice with 302 status code
1) aempublish.com -> aempublish.com/index.html
2) aempublish.com/index.html -> aempublish.com:7000/content/we-retail.html
Dispatcher.any
/virtualhosts
{"aempublish.com"}
/renders
{
/rend01
{
/hostname "internal-uai100567-new-dev-live-publ-295647976.us-east-1.elb.amazonaws.com"
/port "7000"
}
Virtualhost configuration:
<VirtualHost *:443>
ServerName aempublish.com
DocumentRoot /opt/aem/cache/
ProxyPreserveHost On
ProxyPass / http://10.227.230.195:7000/ retry=1 acquire=6000 timeout=600 keepalive=On
ProxyPassReverse / http://10.227.230.195:7000/
<Directory "/opt/aem/cache/">
Require all granted
</Directory>
# Additional Dispatcher or cache configs here as needed
<Directory /opt/aem/cache>
AllowOverride None
Options FollowSymLinks
Require all granted
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
ModMimeUsePathInfo On
</IfModule>
</Directory>
RewriteEngine On
RewriteRule ^/$ /content/aem/global/en_us/home.html [PT,L]
</VirtualHost>Even without Including the VirtualHost config still by default the call is going to :7000/content/we-retail.html
Thanks in advance. Appreciate your inputs on this issue.