kutt
kutt copied to clipboard
Custom home page and moving control panel to a different URI
Hello,
I'm trying to solve a problem at the moment, would love some input and ideas if possible or make this an enhancement request.
Short context: I host Kutt for a friend with a somewhat prominent social media presence, so the instance gets used A LOT. Everything works perfectly so far.
My problem-nonproblem is a bit of a doozy I admit, but I'm trying to make it so nobody except me and my friend can access the Kutt home page and everything that entails reaching that page, so login etc etc...
I want this because, since my friend has a brand, I would like it so that the people searching for the base root domain wouldn't see the kutt homepage, but instead something I can serve from my webserver, more representative of my friend's brand.
Now, more specifically what I want to do is this:
https://foo.bar/ -> Custom page served from my webserver https://foo.bar/admin -> Kutt home page where we can go in and make new shortlinks https://foo.bar/shortlink -> Redirects to whatever it is configured, as usual
I realize this is a bit of an egg-chicken issue and I can't really solve it with NGINX locations in my virtualhost, because (as I gather) once I move Kutt's root location to /admin, then every configured shortlink would end up being /admin/shortlink.
Is this a correct assumption? I have been researching for a while and I'm kind of at a loss and maybe my NGINX knowledge is failing me. Does anyone have any idea?
I assume this could also be an enhancement request because if kutt itself provided this feature I wouldn't have a problem with it at all.
very late update: I was able to do this only with NGINX magics. Still, would be a very good feature.
EDIT: The software tries to be an open shortlink system for people who want to allow others to create their own shortlinks, but it should also allow private and hidden installations from people who only want their own shortlinks without attracting people to Kutt as a 'I can do it myself too' situation.
@wisewtf If you don't mind, can you share your NGINX config file. I'm looking to implement the same.
Thanks.
location = /index.html {}
location = / {}
location = /admin {
rewrite /admin(.*) /$1 break;
proxy_pass http://localhost:5922;
}
location / {
proxy_pass http://localhost:5922;
}
}
@wisewtf If you don't mind, can you share your NGINX config file. I'm looking to implement the same.
Thanks.