Clarification on multi-tenanted sites

Hey all I have created a new wiki on my base installation and enabled hostnamed based path selection, my wiki is based on so I told the creation tool I want setup the appropriate vhost in my web frontend and what not…

Then when I goto I get the exact same page as if I went to how do I get separate pages for each site?

Hi, maybe check your wiki descriptor from the admin UI, see

Hi there thank you for the fast reply, indeed I have a different alias to my secondary (freebsd) site:

And the primary site (restricted to 1 image per post)


there is an nginx running on top of tomcat to provide these, I am simply proxypassing back to tomcat, I am not sure if that would create an issue or not the various urls are and I did not bother creating SSL certs for the sub wiki’s yet until I get this working :slight_smile: or come up with some sort of solution

I’m not really experienced with this. However last time I tested it locally, I’ve simply modified my etc/hosts file to add DNS entries:

where is the server’s ip address.

At least that should allow you to test that it works on the xwiki side and if it does then your issue is with your apache or nginx config.

Just to be sure: are they really the same? :slight_smile: You could change the home page content of your subwiki to make sure maybe.

Note that you can access your subwiki using the /xwiki/wiki/freebsd/view/Main/ URL.

Note: For more details on how domain-based works see

Yes they are definitely the same, I added ‘welcome to bsddoc com’ to the first site and it magically appeared on the freebsd one :stuck_out_tongue:

I also had to disable the virtual path thingy to have multi site work from from the documentation:

That does say subwiki not ‘wiki’ though I wonder if that is relevant, on create wiki it did ask me for the domain that would be requesting it … I wonder what would happen if I forced the Host: header via nginx lets go give it a whirl :slight_smile:

And a winner, for anyone who has this issue using nginx (or anything else) as a reverse proxy this is the minimum set of headers you need(in this case tomcat is bound to :

location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;

No it’s not relevant. We use the two words interchangeably.

1 Like