Xwiki doesn't load correctly on https

Hello guys,

I’m new in Xwiki and and installed the application in a server with Tomcat and Apache. I downloaded the 10.4 version WAR.
I created two vhosts on my Apache (with a proxy, because Tomcat), one to http and other to https.
In http the page load correctly, but in https it load a kind of broken.

Does anyone there know about this issue?

Hi, maybe you haven’t configured xwiki to use HTTPS, see http://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Configuration/#HSecurityconfiguration

Hello, may I?
I use Tomcat server with AJP connector:

   <!-- Define an AJP 1.3 Connector on portxxx -->
    <Connector port="yyyyy" protocol="AJP/1.3" redirectPort="yyyyy"

and Apache reverse proxy (Mod Proxy AJP) to use https
http://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Performances/#HModProxyAJPConfiguration

<VirtualHost *:80>
  # force l'https (à activer)
  Redirect / https://xxxxxxxxxxxxxx.fr/
...

<IfModule mod_ssl.c>
<VirtualHost *:443>
  ServerName  xxxxxxxxxxxxxxxxx.fr
  SSLEngine on
  ProxyPreserveHost On
  AllowEncodedSlashes On
  ProxyPass / ajp://xxxxxxxxxxxxxxxxxxxx.fr:yyyyy/ nocanon
  ProxyPassReverse / ajp://xxxxxxxxxxxxxxxx.fr:yyyy/

....

Do I need to set https in wiki.cfg or not?
xwiki.url.protocol=https

Thxs.
Pascal B

http://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Configuration/#HSecurityconfiguration is (was) a bit misleading.

Setting this property is not required at all, by default the protocol will be taken from the input request and if the proxy is properly configured XWiki will see it’s an https request. Also this is only for external URLs which is not really something XWiki produce much unless you manipulate cross wikis resources (or for mails).

Hi, I tried this configuration and didn’t work at all. I’m trying to think in something that I can do but I don’t know what to do in this case.

1 Like

Is your https access broken too?

No but I have some strange error message with JS file like:

Loading failed for the <script> with source “https://xxxxxx.fr/webjars/wiki%3Axwiki/jquery/2.2.2/jquery.min.js?r=1”. Encyclopédie:1
[Show/hide message details.] Error: Script error for "jquery", needed by: jQueryNoConflict
http://requirejs.org/docs/errors.html#scripterror

Hey guys,

I made it work. I created a vhost on Tomcat and configured a proxy on Apache.

Could you share some kind of instructions, pls.
I have a https problem too. (https://forum.xwiki.org/t/https-error-on-fresh-install-debian-9/4900)

Note that for tomcat, there’s some doc at https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationTomcat/#HConfiguringtomcatforhttps