There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-59295b89-b881-41ff-8993-4e4fd1672cd5 XWIKI-14046 Closed

Server not responding error when saving pages based on templates

 
View issue   ·   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-0f98f26f-603d-4cf7-837b-0842c2092c43 Petr Bodnár on 21/May/24 14:24
 

Mystery finally resolved! smile.png

Firstly, I've checked via the manually created /Headers page as well -> we are also already sending the "X-Forwarded-Proto: https" header from the Apache.

So I've checked the Tomcat side for an issue -> SOLUTION: it is necessary to add the RemoteIpValve valve into the Tomcat's configuration (tested adding it to <Engine> in server.xml, but more specific locations should work as well; no need to set scheme="https" as described previously):

<Valve className="org.apache.catalina.valves.RemoteIpValve"/>

In fact, this valve IS mentioned in the instructions for setup with nginx - here. ISSUE: For an unknown reason, probably just by a mistake, the valve is not mentioned in the section dedicated to setup with Apache - so quite logically, people can miss this step. What about putting this instruction one level up on the linked wiki page?

Thomas Mortagne, hopefully you can confirm my findings.

What still remains a mystery is why sending "Forwarded: proto=https" instead of "X-Forwarded-Proto: https" should also work according to your findings (I haven't tested this myself) and your wiki. Because according to all the documentation and Tomcat's valve/filter (there is also this RemoteIpFilter that does the very same job) source code, support for "Forwarded" simply shouldn't be there...

(And of course, the XWiki's inconsistency in implementing similar "create page" use cases is also still an issue IMHO, but I don't have enough insight to suggest a solution.)