Hi all,
I have installed Tomcat9 and Xwiki Stable 11.9 on a Ubuntu 18.04 LTS server.
On the wiki, all links have an extra “/bin” ; so they don’t work correctly.
I mean:
…/bin/view/Forums/ -> …/bin/bin/view/Forums/
On google , I see that the problem is mostly related with setting " xwiki.webapppath". I have applied that but the result hasn’t changed.
I am new to xwiki and I have no idea how could i fix that, any help would be appreciated.
Thanks…
1 Like
Yes it looks like you made XWiki the default application but did not set xwiki.webapppath
accordingly in xwiki.cfg file. Maybe you forgot to uncomment it (removing the #
in front of it).
1 Like
Hi,
Actually my configuration seems correct:
I am a bit suspicious about the way I have made installation:
I have renamed xwiki.11.9.war to ROOT.war and put it into webapps directory of tomcat. Deleted the ROOT directory and started tomcat server. Tomcat created ROOT and deployed xwiki files into that.
Is there any problem with this installation? Could that cause any problems?
Using WARs makes quite a pain to configure XWiki (you have to modify the files inside the WAR) so we tend extract it into a folder usually.
Where is the xwiki.cfg file you modified located ?
yagabey
November 5, 2019, 10:20am
5
I have modified the file under ROOT/WEB-INF/xwiki.cfg:
Should i remove the ROOT.war after first run?
Better get rid of the WAR since it should not be needed I think (and maybe Tomcat will extract it again, not really sure what is the priority).
If it still does not work could you try to put the following in a wiki page and see what result you get:
{{velocity}}
$xwiki.webAppPath
{{/velocity}}
This macro results like that:
Does that mean something?
Means you have the right configuration so not sure where that double /bin is coming from.
yagabey
November 5, 2019, 8:23pm
11
I removed everything, including database. Reinstalled ; the result is same. I am suspecting about my tomcat installation.
I think there is a xwiki deployment packet containing tomcat? Where could I find it?
Maybe you are referring to http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationViaAPT (which does not “contains” tomcat but have it as dependency) ? It does not really configure Tomcat in any more ways than having XWiki being inserted as an application.
Before reinstalling everything here is a few more things to test:
{{velocity}}
$xwiki.webAppPath
$doc.externalURL
$xcontext.getURLFactory().getServerURL($xcontext.context)
{{/velocity}}
It was working well when XWiki was under/xwiki/ webapp, right ?
yagabey
November 6, 2019, 10:49am
13
The script results like that:
Actually I haven’t tested that. I am using authbind with tomcat to serve the application directly on port 80. Perhaps that is causing some trouble?
According to the test the URLs generated by XWiki are right. Where are the wrong URL located exactly ?
yagabey
November 6, 2019, 11:23am
15
Sorry, I think that was not clear enough. The links on the applications panel on the left are wrong:
OK if it’s only the panel then it looks like a bug. Would be great if you could create a new issue on Loading... for it with all the details you can think of to reproduce the issue.
yagabey
November 6, 2019, 12:46pm
17
Ok , thanks. I will do that.
There are two main lines that you need to uncomment to remove the above error.
Edit xwiki.cfg and uncomment following two lines:
xwiki.webapppath=
xwiki.servletpath=
No need to add anything just uncomment and restart tomcat
systemctl restart tomcat9
2 Likes
this worked for me thanks