Administrator page is not loading when running behind apache httpd

Hello,
I have xwiki-9.11.4 Standalone WAR distribution installation on tomcat(deployed as ROOT) and I have configured apache with AJP proxy to call xwiki.
Administer Wiki page is not loading when hitting url from apache. As apache is adding trailing slash(/) at the end of url.
Is there a way in xwiki where I can set this redirection rule as
mydomain/bin/admin/XWiki/XWikiPreferences/ ==> x.x.x.x:8080/bin/admin/XWiki/XWikiPreferences
Note: I cannot change default apache setting related to directory slash.

Thanks in advance!!

Hi,
maybe you can post your rewrite/proxy rules to help you better.
At least you should ensure that slashes are balanced, i.e. something/ proxies to otherthing/ or something proxies to otherthing not something to otherthing/.

hello,

Following is the configuration we are using in apache vhost.conf file.

    AllowEncodedSlashes NoDecode

    <LocationMatch "^/(skins|resources|webjars|rest)/(.*)$">
            RedirectMatch  ^(.*) /wiki-static$1
    </LocationMatch>

    ProxyRequests Off
       <Proxy *>
        Order deny,allow
        Allow from all
       </Proxy>
    ProxyPreserveHost On

    ProxyPass "/wiki-static/" "ajp://tomcathost:8009/"
    ProxyPassReverse "/wiki-static/" "ajp://tomcathost:8009/"

    ProxyPass "/subwiki1/wiki/" "ajp://tomcathost:8009/wiki/subwiki1/"
    ProxyPassReverse "/subwiki1/wiki/" "ajp://tomcathost:8009/wiki/subwiki1/"

    ProxyPass "/wiki/" "ajp://tomcathost:8009/wiki/"
    ProxyPassReverse "/wiki/" "ajp://tomcathost:8009/wiki/"

    ProxyPass "/bin/" "ajp://tomcathost:8009/bin/"
    ProxyPassReverse "/bin/" "ajp://tomcathost:8009/bin/"

there are two tomcat instances connected from this vhost. One is connected using AJP worker and XWiki is connected using mod_proxy.

Which directive does the actual appending of the slash? Even if you cannot touch that one it might be interesting to know what it looks like. (Or maybe it is already in the code snippet you posted and I just fail to see it?)

Although I don’t really understand your particular configuration and the reason for this, but might hint you to xwiki.cfg.

What did you set as

xwiki.home=

Make sure that if it set that you have a trailing slash!

See also

xwiki.webapppath=

Note: changing this file requires a restart AFAIR

Hello,
Thanks for your response!!

We have this kind of configuration because there are two tomcat instances deployed as root are connected to same vhost. So, first is tomcat instance(our web application) mounted on /. We needed website of wiki like “DOMAIN FOR SALE”.
To achieve this we have connected XWiki tomcat instance using ajp proxy.

By using this configuration everything is working fine, only admin page is not loading.
url is : DOMAIN FOR SALE

Its adding slash at the end

At tomcat URL is: instanceIP:8080/bin/admin/XWiki/XWikiPreferences
without trailing slash, so loading fine.

Is there a way in xwiki where I can define that it should load same page with or without slash. Or on apache I can define particular rule for this particular url?

Thank you.

Hello,
I am able to solve this issue using urlrewritefilter

thank you all!!