I am a french developer in a company and I want to deploy a wiki on a virtual machine with Docker.
I also want to do a redirection from an other virtual machine with an Apache reverse proxy.
To do so, I want to deploy xwiki not as ROOT but as something else, anything else, for example : wiki.
So that, when an url is beggining with wiki, I can say that it’s a xwiki route, and the Apache redirection is just working fine.
For now, I just used the Docker image and I have changed the webapppath in xwiki.cfg file. Just like that : xwiki.webapppath=wiki. I restart the container and boom everything is working except, url with /resources or /webjars.
I have no idea how to fix that. Or maybe the solution is to deploy as something else than ROOT, but how ? Do I have to build a custom Dockerfile ?
Thank you so much for your help !
Please do not hesitate to ask any question because I may be not perfectly clear
It’s exactly what I want to do. Do you have any idea when this feature could be added in the docker command ? Or if there is an other temporary solution to overcome that ?
I first changed “RUN rm -rf /usr/local/tomcat/webapps/wiki/" insted of "RUN rm -rf /usr/local/tomcat/webapps/” because I had "Directory not empty errors when bulding the image.
And I then changed every “ROOT” for “wiki” because I want all my urls prefixed with “wiki”. And I also changed the part where webapppath is assigned to empty string.
What I have so far is :
upload these files on the server
in this directory : $ docker build -t customxwiki_image .
create directory : $ mkdir -p /var/customxwiki
change rights of the script : $ chmod +x docker-entrypoint.sh
For anyone who is having the same problem, I am giving some updates.
The issue is that I am trying to build a docker image on CentOS 7.
With this command : $ docker info
We can see that I have a warning :
For now, as a workaround, you’d just need to go into your servlet container docker container and move webapps/ROOT into webapps/xwiki for example and adjust the context.xml (for tomcat). XWiki is using standard webapps deployment from your servlet container.
Now re reverse proxy with ROOT, I think someone reported a solution not long ago on this forum.