Hello,
Could you please let me know how can we use reverse proxy to allow non aem server to post pages to a directory on the main domain on AEM site (Eg: www.yourdomainname.com/test-one)?
I have tried adding the below syntax in the vhost file in dispatcher module of Apache server for using reverse proxy. However, this didn't work and faced a 404 on dispatcher upon server restart. The reason might be dispatcher reverse proxies to the publish instance. How can we bypass this issue to setup reverse proxy?
<VirtualHost *:80>
ServerName www.yourdomainname.com
ProxyRequests off
RemoteIPHeader X-Forwarded-For
Header set xxx-Proxy-Version "1.0"
ProxyPreserveHost On
<Location /test-one >
ProxyPass "http://xxx/test-one"
ProxyPassReverse "http://xxx/test-one"
Order allow,deny
Allow from all
</Location>
<Location /test-one/(.*) >
ProxyPass "http://xxx/test-one/(.*)"
ProxyPassReverse "http://xxx/test-one/(.*)"
Order allow,deny
Allow from all
</Location>
</VirtualHost>
Thanks,
Ram
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @RamTejaReddy - I would say, maybe you can enable the debug logging and check if the path is being proxied correctly.
Hi @RamTejaReddy ,
Can you try changing the lines
ProxyPass "http://xxx/test-one"
ProxyPassReverse "http://xxx/test-one"
to
ProxyPass "/" "http://xxx/"
ProxyPassReverse "/" "http://xxx/"
Since your location is already set to "/test-one", this proxy rule should apply only to the URLs with /test-one in the path.
Also, For regex pattern like /test-one/(.*), you should use LocationMatch directive:
Ref: https://httpd.apache.org/docs/2.4/mod/core.html#locationmatch
Hope this helps!
Thanks,
Fani
Hi @Fanindra_Surat, thanks for your response. Unfortunately, this didn't work. The server restart failed and got an 404 on dispatcher. The reason here is by default, dispatcher reverse proxies to publish instance. Pls let me know if you have a solution/alternatives?
Thanks,
Ram
Hi @RamTejaReddy - I would say, maybe you can enable the debug logging and check if the path is being proxied correctly.
Were you able to resolve it? I am trying to achieve the same functionality and I am facing the same issue than you
Views
Replies
Total Likes
Hi,
We are also looking for the same, any solutions for this ?
Thanks
Raviteja K
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies