[MOVED] Charlag is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
[MOVED] Charlag @charlag

Y'all,

Can Masto be hosted not in the root of the domain?
I just need to do some unholy things with swapping the base URL for the multiaccount in but I'm not sure if it's enough to swap the hostname or I need to somehow figure out how much do I need to swap.
I've never seen such instances so I'm not sure.

· Web · 2 · 1

@charlag I barely understand your question. But if it helps you can mirror a subdomain to a different folder on disk in Apache & nginx config.

If it's a different server entirely you'd set the redirect at DNS level.

@bobstechsite my question is, can Mastodon be hosted on
https://somedomain.tld/sometpath
?
If it can be, then when user changes accounts it's not enough to swap somedomain.tld part, I would also need to change /somepath

@charlag I believe so. I'd be inclined to subdomain it though to make life easier because otherwise it's not immediately obvious when you use the wrong REST call.

Eg.

Domain/rest/path/quite/long/
Domain/custom/rest/path/quite/long/
Sub.domain/rest/path/quite/long/

You can tell in path 3 that you're making calls to a different instance. In path 2 you could be making a call to the same instance.

@charlag My masto instance is not on root of my domain. So I suppose : Yes !

@seb_vallee sorry, I just cannot formulate it properly, your instance is still social.svallee.fr, not social.svallee.fr/mastodon

@charlag Oh. Sorry for misunderstanding it ! Then I'm not sure about this possibility, but It may be possible with correct tuning on the reverse proxy, I think...

@charlag I will try some test this afternoon (I'm a curious guy !)

@seb_vallee oh, cool, thank you! (I hope it won't work, though, because I'm lazy :D)

@charlag I did some tests, and they all failed, so I searched for an explanation, and I found that : github.com/tootsuite/mastodon/. Hope you'll get your answer !

@seb_vallee thanks! I think I can safely ignore this for now

@charlag this is not possible on Mastodon currently.