on 10-13-2017 5:10 PM
Hi Experts,
We have webserver sand Appserver (2 Servers clustered),
Below is my webserver configuration, When I access the Application via Webserver Images are not displayed whereas same images are getting loaded when i access App directly
#Do not remove, used by apache to route session to appropriate route
Header add Set-Cookie "SFlCX1JPVVRFX0lE=s.%{BALANCER_WORKER_ROUTE}e; path=/;" env=BALANCER_ROUTE_CHANGED
ProxyBadHeader Ignore
ProxyStatus On
ProxyRequests Off
<Proxy balancer://hybriscluster>
BalancerMember ajp://APP2IP:8009/testtelcostorefront route=route1 keepalive=On ping=1 ttl=60
BalancerMember ajp://APP2IP:8009/testtelcostorefront route=route2 keepalive=On ping=1 ttl=60
ProxySet lbmethod=bytraffic
ProxySet stickysession=SFlCX1JPVVRFX0lE
</Proxy>
ProxyPass /testtelcostorefront/ balancer://hybriscluster/
ProxyPassReverse /testtelcostorefront/ balancer://hybriscluster/
ProxyPass /medias/ balancer://hybriscluster/medias/
ProxyPassReverse /medias/ balancer://hybriscluster/medias/
TraceEnable off
SetHandler balancer-manager
Order Deny,Allow
Deny from all
- Below is the Access Log in Appservers:
If i access Appserver directly Image is loading:
"GET /medias/bannerImage-1.jpg?context=bWFzdGVyfGltYWdlc3wyODg2ODV8aW1hZ2UvanBlZ3xpbWFnZXMvaGFjL2g3NS84Nzk3NjgxMDkwNTkwLmpwZ3xmMjVjMDg2MzUzZGVmMjI5MzA0MmY2NTk5NGVjOGIzYzk3YzJjZTdhZGM2MzVmZDA4ZDgwOWFkMzQwMmE3MzA3 HTTP/1.1" 200 288685 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
If i access via Webserver below is the access log in Appserver (404 Exception),
"GET /testtelcostorefront/medias/bannerImage-1.jpg?context=bWFzdGVyfGltYWdlc3wyODg2ODV8aW1hZ2UvanBlZ3xpbWFnZXMvaGFjL2g3NS84Nzk3NjgxMDkwNTkwLmpwZ3xmMjVjMDg2MzUzZGVmMjI5MzA0MmY2NTk5NGVjOGIzYzk3YzJjZTdhZGM2MzVmZDA4ZDgwOWFkMzQwMmE3MzA3 HTTP/1.1" **404** 8272 "https://WEBIP/testtelcostorefront/login
Thank, Sheik
It seems you want to change the webroot of the storefront using the web server proxy, that could cause trouble not only with paths but also with cookies 1) Remove testtelcostorefront from your BalancerMember directives
< Proxy balancer://hybriscluster >
BalancerMember ajp://APP2IP:8009 route=route1 keepalive=On ping=1 ttl=60
BalancerMember ajp://APP2IP:8009 route=route2 keepalive=On ping=1 ttl=60
ProxySet lbmethod=bytraffic ProxySet stickysession=SFlCX1JPVVRFX0lE
</Proxy>
2) also you should only have one ProxyPass to /:
ProxyPass / balancer://hybriscluster/
ProxyPassReverse / balancer://hybriscluster/
3) restpache then change the tomcat root context of your storefront to / using the following properties: mystorefrontextension.webroot= storefrontContextRoot= execute ant server
Your medias should work now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks lot cristian it property change worked.. mystorefrontextension.webroot= storefrontContextRoot
Actaully we used without contextpath in apache first but it did not worked so we added contextpath to make it work but it cause the image issue. solution was property file change to defile the contextpath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.