Hi everyone!
I am trying to set up XWiki as installed via the Debian package, with short URLs. Jetty is used and Nginx is used as reverse-proxy. I followed the Short URL Guide and the Jetty information when used with a Debian package.
This means I did the following:
- Add the Nginx rewrite rules and ensured they are as described in the wiki
- Modified
/etc/xwiki/xwiki.cfg
so these values are now in effect:
xwiki.webapppath=
xwiki.defaultservletpath=
- Modified
/etc/xwiki/web.xml
and included this snippet at the very end in theweb-app
block:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
- Modified
/etc/xwiki/xjetty-web.xml
to include this XML in theConfigure
block at the very end:
<Set name="contextPath">/</Set>
If I now navigate to the website, https://mydomain.tld, it redirects to https://mydomain.tld/xwiki/ and I am greeted with an error 500:
## HTTP ERROR 500 jakarta.servlet.ServletException: Failed to extract the Entity Action from URL [https://mydomain.tld/xwiki/]
Caused by:
org.xwiki.resource.CreateResourceTypeException: Invalid standard scheme URL type. The URL is missing a path segment and should be of the format [/<type>/something/...]
at org.xwiki.url.internal.standard.StandardStringResourceTypeResolver.resolve(StandardStringResourceTypeResolver.java:56)
at org.xwiki.url.internal.standard.StandardStringResourceTypeResolver.resolve(StandardStringResourceTypeResolver.java:43)
at org.xwiki.url.internal.DefaultStringResourceTypeResolver.resolve(DefaultStringResourceTypeResolver.java:81)
at org.xwiki.url.internal.DefaultStringResourceTypeResolver.resolve(DefaultStringResourceTypeResolver.java:45)
at org.xwiki.url.internal.AbstractExtendedURLResourceTypeResolver.resolve(AbstractExtendedURLResourceTypeResolver.java:89)
at org.xwiki.url.internal.standard.StandardExtendedURLResourceTypeResolver.resolve(StandardExtendedURLResourceTypeResolver.java:100)
at org.xwiki.url.internal.standard.StandardExtendedURLResourceTypeResolver.resolve(StandardExtendedURLResourceTypeResolver.java:57)
How am I supposed to fix this? Please note that I skipped over these instructions in the Wiki page:
In Jetty, with the default configuration, all it takes is to deploy the XWiki web application in webapps, in a sub directory named root. Note that if you’re using the Standalone distribution (which packages Jetty and HSQLDB) then you’ll also need to:
Remove the existing webapps/root directory which contains a redirect Servlet that automatically redirects root URLs to the xwiki context. You won't need that anymore. Rename the existing webapps/xwiki directory into webapps/root. Remove the jetty/contexts/xwiki.xml file and thus keep only the jetty/contexts/root.xml file. Otherwise you'll get a warning in the console.
These did not look relevant to the Debian-package-based installation and I read elsewhere that the Debian package already has the necessary prerequisites. If I am however supposed to actually do as the Wiki says, I will have to perform these changes in /usr/lib/xwiki-jetty/
. That path being in /usr/lib
means that every Debian package update will delete the change I did or cause worse issues (since there will be symlinks invoolved), so I am very hesitant to make changes there and delete the /usr/lib/xwiki-jetty/webapps/xwiki
symlink and the /usr/lib/xwiki-jetty/webapps/root/
folder and replace the latter with a symlink to /usr/lib/xwiki
.
So, what is the correct way to fix this and get XWiki+Jetty+Nginx working on a Debian-package based installation? Or is this even a bug?
Thank you for your help!
1 post - 1 participant