Code Monkey home page Code Monkey logo

Comments (15)

NoFloXx avatar NoFloXx commented on September 25, 2024 1

That works, but what bothers me about this 'redirection' is that the browser then says /USER next to the address and I don't want that.
That's why I'm leaving it this way now so that I use one instance for each user. Not so wild. :)

from linkstack-docker.

JulianPrieber avatar JulianPrieber commented on September 25, 2024

Are you aware that LinkStack does support this by default and you can just configure it in the config? Or is there a specific reason you are trying to solve this in your nginx vhost?

from linkstack-docker.

NoFloXx avatar NoFloXx commented on September 25, 2024

No, I wasn't aware of that.
But since I host LinkStack locally at my home and don't have IPv4, I have to do this via Nginx.
How do I configure Nginx in LinkStack?
Maybe that already solves my problem?

from linkstack-docker.

JulianPrieber avatar JulianPrieber commented on September 25, 2024

I use NGINX for every LinkStack instance I host. If you want your user profile to be your home page, you can set it up easily using LinkStack's internal routing system. Just go to your configuration settings and choose your profile under the "Set user page as Home Page" option.

from linkstack-docker.

NoFloXx avatar NoFloXx commented on September 25, 2024

Ah okay. I didn't see this option.
But unfortunately that doesn't work for me because I have 3 accounts running on my installation of LinkStack.
Can this be solved another way? Because that bothers me a lot and I don't want to have 3 separate instances running on my Proxmox server for LinkStack, since each instance requires more RAM etc....

from linkstack-docker.

JulianPrieber avatar JulianPrieber commented on September 25, 2024

This only works for one user

from linkstack-docker.

NoFloXx avatar NoFloXx commented on September 25, 2024

Thanks, I've now solved it the way you did:
A new instance was opened in Proxmox for each user. It's a shame that this can't be solved any other way.

But I still thank you for your help! <3

from linkstack-docker.

JulianPrieber avatar JulianPrieber commented on September 25, 2024

I'm not saying it's impossible using NGINX, just with the setting in the app. I'm pretty sure this can be done, especially with simple redirects. Using NGINX should help you achieve it, though I'm not entirely sure if I can assist you directly. Still, it should definitely work.

from linkstack-docker.

NoFloXx avatar NoFloXx commented on September 25, 2024

Yes, I have already tried several or 2 variants in NGINX and neither of them worked.
Once under Locations I specified the IP/@user and once just IP and then this in the field for other configurations at the bottom:
location = / {
return 301 /@user;
}
That didn't work either.

So thank you, at least that's how it works. :)

from linkstack-docker.

JulianPrieber avatar JulianPrieber commented on September 25, 2024

Doing the redirect is easy. Just add the domains you want to redirect to your block.
Then add this somewhere to your block:

  if ($host = 'exmaple.com') {
    return 301 https://xyz.com/@admin;
  }

from linkstack-docker.

JulianPrieber avatar JulianPrieber commented on September 25, 2024

@NoFloXx This is now a full feature: https://github.com/LinkStackOrg/LinkStack/releases/tag/v4.6.0#3

from linkstack-docker.

NoFloXx avatar NoFloXx commented on September 25, 2024

@JulianPrieber
Thank you for that info!
But how do I put that into the config and where?
Unfortunately this doesn't work in the NGINX reverse proxy...
Sorry, I'm not a programmer or IT person, I just do this as a hobby.

from linkstack-docker.

JulianPrieber avatar JulianPrieber commented on September 25, 2024

You just paste the example into your advanced config somewhere after the return [. If you want to make sure it's not going to cause any errors, you can validate your config before saving with this site: https://phpcodechecker.com/.

I assure you this works on NGINX. All our features are tested and working on NGINX and Apache. The example shown in the release notes is running on NGINX.

Everyone working on this project is doing this as a hobby, we're all just learning as we go.

from linkstack-docker.

JulianPrieber avatar JulianPrieber commented on September 25, 2024

I made some changes to the Advanced Config: https://github.com/LinkStackOrg/LinkStack/blob/main/storage/templates/advanced-config.php

This should make it a bit more clear where you can add this option.

from linkstack-docker.

NoFloXx avatar NoFloXx commented on September 25, 2024

Perfect, I've now managed it using the ID function.
I thank you!! <3

from linkstack-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.