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.
Solved! Go to Solution.
Views
Replies
Total Likes
@VikramP8 if this is happening even without Vhost config, i feel issue is somewhere in your publisher..
Have you checked your externalizer "Day CQ Link Externalizer" or etc maps ? How's is it configured?
Publish domain should not contain port
Hi @VikramP8 ,
Your AEM Publish instance must know it’s behind HTTPS (via the dispatcher+ALB). You need to pass the right X-Forwarded-* headers, and configure AEM to honor them. Try to pass additional headers:
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
RequestHeader set X-Forwarded-Host "aempublish.com"
or
RequestHeader set X-Forwarded-Proto "http"
RequestHeader set X-Forwarded-Port "80"
RequestHeader set X-Forwarded-Host "aempublish.com"
I have added the request header details as well. But still experiencing the same.
Thanks
Views
Replies
Total Likes
@VikramP8 if this is happening even without Vhost config, i feel issue is somewhere in your publisher..
Have you checked your externalizer "Day CQ Link Externalizer" or etc maps ? How's is it configured?
Publish domain should not contain port
below are the configurations setup in the externalizer
local http://localhost:7000
publish https://aempublish.com
Thanks
Thanks @Shashi_Mulugu. Issue was with one of the etc mappings which was rectified and it resolved the issue.
Views
Replies
Total Likes
Hi @VikramP8 ,
Try removing the port from
ProxyPassReverse / http://10.227.230.195:7000/
Try using it like this
ProxyPassReverse / http://10.227.230.195/
Thanks
Views
Replies
Total Likes
Views
Likes
Replies