← Feed
@Jayjader@jlai.lu
Post #3519210
2026-06-11 11:25 UTC
No idea how easy this will be to follow if you’re forced to rely on text-to-speech and/or other assistive technologies, but here goes:
to tell nginx the product is physically on /wp/, you probably want a root /wp directive
to tell nginx the browser can point to domain.tld/post or domain.tld/english/post, you probably want two location blocks (one for each url) that each contain a rewrite directive that massages the url requested by the browser into pointing to the correct post or page location.
for this to be in a file on it’s own, and assuming your nginx setup is pretty standard, you probably want to have the entire server block be in a file that lives in the sites-available directory and symbolically linked (“symlinked”) into the sites-enabled directory.
For the rewrites, here is the link to the relevant documentation page: nginx.org/en/docs/…/ngx_http_rewrite_module.html . You will need to understand the basics of how to write a Regular Expression, or get someone to write it for you. If you can’t find a human that’s available and willing to help, maybe a back-and-forth with an L.L.M. can get you to what you need (I don’t like suggesting L.L.M.s but being sighted myself I don’t really know if they’re better or worse than recommending you just work at learning how to do this on your own, given the current state of the web).
Replies (2)
-
@Jayjader@jlai.lu this is when AI could help more. To help me not getting lost into very long docs, with lots of tables and maybe graphs and screenshots
but I'm afraid of allucinations
Open ##3519211
-
@Jayjader@jlai.lu -
I managed to make nginx work now it redirects domain.tld to domain.tld/wp
with this one
----
location = / {
return 301 /wp/;
}
location ^~ /.well-known/ {
rewrite ^/\.well-known/(.*)$ /wp/.well-known/$1 last;
}
location / {
return 301 /wp$request_uri;
}
----
I honestly don't know all of this language, but the intention is to make it work on ActivityPub - I can't try federating my current test environment, I'm forced to try the federation on production site directly when it is available.
Damn...
Searching and asking my hosting provider makes me turn exhausted.
Open ##3519212