For anyone else who runs into this issue this is a quick work around that I configured to gain outside access to XWiki -
First create a simple redirect within the main tomcat9 page that shows up when accessing [IP of machine]:8080. Note that anything trailing after the 8080 is truncated and doesn’t route within a forwarding rule so you will need to specify it directly. An example is that I created the forwarding to take the External WAN IP and to forward it to -
http://[IP of XWiki machine]:8080/xwiki/bin/view/Main
But all it would do is truncate it to -
http://[IP of XWiki machine/localhost]:8080
Which is the tomcat9 homepage and is the reason for why I ran into the issue describe above.
To work around this issue do the following -
Go to -
/var/lib/tomcat9/webapps/ROOT
and backup the index.html file with the following command -
sudo cp index.html index.html.bak
Edit the index.html file by using vim or nemo or whatever editor you have installed.
Within the [info here] code block type in the following to create a redirect link within the index.html page -
XWiki
Note that this also can be done with an index.jsp file too by following the directions from my OP above in the “Stack Overflow” link.
Once you add this line of code you are telling the link to go from it’s original page (http://[IP of Machine]:8080) and drill down further to the XWiki login page located at /xwiki/bin/view/Main.
I wish I could get the link to go directly to the XWiki login page and will update this post when I finally figure it out. Regardless this is a quick work around to be able to gain login access to the wiki from outside and to test XWiki on a mobile device.
This worked for me but I also performed the following tweaks to ensure it knew where to go -
Edit the xwiki.cfg file to specify the domain of your wiki. Create a copy of this file before making any edits. Navigate to the following path -
/etc/xwiki/
And copy the xwiki.cfg file found in this folder using the following command -
sudo cp xwiki.cfg xwiki.cfg.bak
After the file has been backed up open it in any terminal text editor such as vim or nemo. I used nemo so I performed the following command -
sudo nemo xwiki.cfg
Scroll down until you see the section under “URLs”. Within this section you will see commented out lines like the following -
xwiki.home=http://www.mydomain.com
etc. with another one similar to this. Add the following line to open your database/domain to the internet -
xwiki.home=http://[IP of machine]:8080/xwiki/bin/view/Main
Ofc. your wiki or sub wiki’s may have their own domain in which case something like http://xwiki.[IP of machine]:8080 should be edited accordingly.
Hope all of this helps!