Custom webprefix / webroot. #251
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Good evening,
Is there a way to set a custom webprefix / webroot?
I think what you want is the
url
setting in the config file?By default I'm using nginx proxy redirects:
But it doesn't works well, so the url config would be nice.
I don't understand what you are trying to do and why you are trying to do it.
If you want to use a different base URL for foundkey you can use the
url
field in the configuration file as I said before.I mean, I just wanted to have FoundKey under
/foundkey/
directory in the URL. But still FoundKey is looking for resources at/
.Why I want to do that is because I want to have main page
/
on something else.Does this still happen if you set
url
in.config/default.yml
to the base URL? e.g.https://example.com/foundkey/
?Yeah, it's ignoring the
/foundkey/
element after the domain name.You're not really supposed to do this.
Federation is a very fragile thing and you're essentially moving outboxes and such.
While this could be possible in theory, it would have side effects you are definitely not thinking of in your nginx config.
Requiring people understand AP well to be able to configure stuff in a particular way isn't really reasonable, so it's unlikely support for this will be added.
What side effects will it have?
If you change the URL after starting the instance, other instances might think that all the old users disappeared for some reason and new actors appeared.
There are also non-enumerated problems that may arise if some path is not redirected correctly, e.g.
.well-known
. If you really want to do that we would advise you to start your own server implementation instead or use one that supports this.In our opinion, this feature would require too much consideration and would be too fragile to implement.
There's a second way to change webroot. Host FoundKey through nginx on different port, set
X-Frame-Options
toALLOW-FROM SAMEDOMAIN
& Embed it into HTML, set asindex.html
. Finally throw in i.e./foundkey/
or/social/
.Also here's the sneak-peak HTML code for redirecting (if location is /foundkey/):
In nginx set: