Follow

How do I rewrite requests in Nginx to gameliberty.club/system into lowondisk.space/mastodon ?

· · Web · 2 · 0 · 0

@matrix The short answer is using proxy_pass. Are you trying to use that currently and not working?

@q I'm using
location ~ ^/system/(.*) {
rewrite ^ lowondisk.space/mastodon/$1;
}

I thought it would just replace part of the URL but it redirects all requests to lowondisk.space/mastodon

@matrix Yeah, try doing a proxy_pass instead. That’s how I’m able to route glowers.club on my VPS to my home server. https://stackoverflow.com/questions/63877741/nginx-proxy-pass-with-rewrite-and-regex

@q Looks like it's not working. I think that some part of the default Mastodon Nginx config might be conflicting with it.

@matrix I’m not familiar with their default config, but I guess you’ll have to back it up, try editing it and pray :/

@matrix @q redirecting is not a good idea. It doesn't always work and also breaks some https clients.

Use proxy_pass
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.