]
Tuyen Nguyen The commented on GTNPORTAL-3499:
---------------------------------------------
This is caused by apache 2 configuration, apache proxy will pass the Host is the hostname
specified in the ProxyPass line by default.
When i configure apache proxy follow the guideline at
.
{code}
HttpServletRequest#getRequestURL()
{code}
After i add this configuration to apache proxy:
{code}
ProxyPreserveHost On
{code}
everything become ok.
So, to fix this issue, we have to turn on option ProxyPreserveHost in apache proxy
configuration.
Result of Rest API contains original host when Gatein runs behind
apache server via HTTP protocol
-------------------------------------------------------------------------------------------------
Key: GTNPORTAL-3499
URL:
https://issues.jboss.org/browse/GTNPORTAL-3499
Project: GateIn Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.5.9.Final
Reporter: Tran Trung Thanh
Assignee: Tuyen Nguyen The
Original Estimate: 6 hours
Remaining Estimate: 6 hours
- Configure eXo Platform with apache 2 via HTTP protocol by following
http://docs.exoplatform.com/public/topic/PLF40/PLFAdminGuide.Deployment.S...
- Start Gatein server at localhost:8080
- Access Gatein service by using address of apache for example example.localhost
- Login as john
- Call REST API:
http://example.localhost/rest/private/managed-components/mop/usersites/jo...
-> The result contains the original host
{noformat}
{"description":"List of child pages for page
'Tab_Default'","children":[],"operations":[{"operation-name":"read-resource","operation-description":"Lists
available pages at a specified
address.","link":{"rel":"self","href":"http://localhost:8080/rest/private/managed-components/mop/usersites/john/pages/Tab_Default"}},{"operation-name":"read-config-as-xml","operation-description":"Reads
pages as configuration xml at a specified
address.","link":{"rel":"content","href":"http://localhost:8080/rest/private/managed-components/mop/usersites/john/pages/Tab_Default.xml","type":"application/xml"}},{"operation-name":"export-resource","operation-description":"Exports
pages configuration xml as a zip
file.","link":{"rel":"content","href":"http://localhost:8080/rest/private/managed-components/mop/usersites/john/pages/Tab_Default.zip","type":"application/zip","method":"get"}}]}
{noformat}
Note that: No problem when configuring apache front-end with ajp.