-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement]: Add subfolder URL path instead of using a subdomain #385
Comments
I second this. |
Would be a nice. Is there any chance this gets implemented? |
+1 Maybe it helps collecting code permalinks, that maybe need to be adjusted? Probably (server and client-config):
Maybe (client):
What about the app? |
How is the state of this issue? You said in #570:
So there is work to do in:
I did not find a branch with your failed attempt, but I would really like to help you with this issue and submit a PR, if you don't have the time. I would just need your help to point me into the right direction... the collected parts of code above might be a first step, but I do not know, what code parts may be also critical / necessary... Should I fork and create a branch / PR for discussion? Or would you just list the things you tried out and failed with? Thank you. |
Thanks, I could use some help. The part where I got hung up was passing that environment variable to the Nuxt.js app so that we can set the base url in the nuxt.config.js file. I'm not sure the best way to handle that. I think setting that would handle the web app client portion of this. I'm not sure exactly what would be needed on the server yet. We can chat about this in discord also if that is easier or start a discussion in GH whichever you prefer. |
Progress update:
|
Oh great, how are you passing the env variable to the nuxt app? |
That is something I am working at. I tried some static options first and it worked partially with the options
The I'm currently trying to figure out a reliable way to make this work and if I have this, I'll try the dynamic configuration. There is also this ticket: nuxt/nuxt#7312 which might help to configure it runtime, so that one does not need to retranspile the whole client for changing the Maybe |
Prefix is better since that is all we want passed into the env variable. I was having the same issue you are working on. We can use the runtime config but the problem I had was actually accessing that env from the client. The env's available on the server aren't available in the nuxt app. |
Ok, I'll regard that. Currently it is an experiment - not a working thing. Maybe I have to rethink everthing.
I'm aware of this. I would prefer this
because without a leading slash using relative references it would work everywhere without any runtime changes or variables. It seems that Instead of using
That is what I am investigating. Here are some links: |
@sandreas I missed your last comment here. Are you still working on this? I can look into this today |
@advplyr Not really, my son was born 6 days ago, now I don't have the time. Would love to see you look into this, otherwise this will take a lot of time, the next 3 weeks no development ;) |
@sandreas Congrats! Thanks for the update |
Hope your new son is doing well @sandreas! - He's what, 4/5 weeks old now? - He must be sleeping through the night and barely disturbing you, right?.. right!? :D I have no way of helping with the development other then offering to be a guinea pig beta tester when it gets there! Fingers crossed for this in the near future. |
Yeah he is alright thank you.
Unfortunately this is not the way it goes ;-) However, its surprising how insomnia gets you back to development. But @advplyr was very right: nuxt is really nasty here. I tried many things to get this working reliably but atm I'm out of ideas... My branch contains a PARTIAL solution for ONE problem and combines multiple points of failure to one. But since I'm not a nuxt expert and it was really frustrating to debug this, I'm not going to invest time here in the next weeks. I have a lot of projects going on and since this problem would be "nice to have" and is not mandatory for my system to work, I deferred my efforts to get this working. |
Am I correct in the assumption, that this is already implemented using I am happy to help here in any way possible. Just checking the desired behavior here: Do you intend to solve this inside the server code, or do you want to change the nuxt target type? |
Correct. The server side part should be good to go although I haven't tested that env variable in a while.
I'm not sure what the best way to solve it is. My initial thought is that we have the server build Nuxt programmatically. I haven't spent a lot of time looking at the internals of Nuxt but there is some info about this approach https://nuxtjs.org/docs/internals-glossary/nuxt/. I would really appreciate your help or feedback if you want to dig into any of this. I'm also active on the Discord/Matrix servers if you want to chat about it. |
I took a non-traditional approach when first setting this up because I tend to learn as I build, so I just didn't know at the time. |
Thats the best way to learn things, at least for me. Give me a few days to fiddle aroundwith it, haven't used nuxt in a while. Given the amount of free time currently, it will probably be a bit hacky, bu I'll make sure it's robust (That is if I manage to find one). This is an amazing project, I spend 2+ hours a day listening to audibooks. So I will definitely invest more time into this in the future. |
Right. After a little fiddling and digging through nuxtjs changelogs, I have come to the following conclusion:
I think they all have their pros and cons
I am currently dabbling with UpdateI have gotten around the issues with crashing my client when manually updating paths. I am currently working on running and accessing the socket under the given base path. |
I'd like to present an additional use case, which is how I use it although it seems that everyone already supports the idea. I currently use Nginx's reverse proxy with different subfolder paths to distinguish between Apache Guacamole (a remote desktop app over the web that also utilizes websockets) and Wetty (a web-based terminal). I would prefer to use a subfolder URL for Audiobookshelf, as it would eliminate the need to obtain another certificate for an additional subdomain. I use Let's Encrypt for my certificates which makes the process of obtaining and managing certificates relatively simple and automated. However, having fewer certificates to manage would still simplify the process. |
A little off-topic: You could use letsencrypt wildcard certificates ( |
Yea I guess it’s slightly off topic. I forgot to use wildcard certs when I first setup my system. I don’t think it’s trivial to convert once you have gone down the road of individual certs. I think I would need to revoke all my certs and start over. |
I could be entirely wrong here as I never worked with anything from the underlying stack, but isn't this supported in nuxt using the runtime config, as described with basically the exact example here
Giving a bit more context on the runtime config from here
|
Is there any news on this? I would also like this feature if not yet implemented. |
Hi. What shoud I do if my server already have subdomain (like srv.server.com). How to configure nginx and ssl to audiobookshelf.srv.server.com? Will audiobookshelf work like this? |
Create a server block in nginx like:
You could set that listen to whatever you like, but if you use 443 you'll need to set up certs. I set mine up with letsenrypt. The block above was spit out by AI, but it's similar to mine except I've added encryption. |
@1nVitr0 I do not mean to nag, but would it be possible to know the progress status on this? |
I added a small writeup in discussion #3535 to lay out my plan for supporting this within the current codebase. I already have this mostly working on my dev environement, but I wanted to solicit some feedback before I continue, since the changes I'm suggesting are somewhat subtle. |
After reading all the comments it's pretty obvious that this issue is a hard nut to crack. 😄 However, this also seems to be the most requested feature at the moment. And although partial progress has been reported, plus @mikiher already compiled a very helpful gist... I'm still confused. 🤯 So... is anyone still actively working on this? 🤔 I don't want to be impatient or demanding. Thanks! |
I am working on it, and it is indeed a bit of a hard nut to crack, as you say (as you may have seen there was some additional discussion in #3535 which complicated things a bit more). I was side-tracked a bit by some other crash-causing issue I need to deal with first. I'll definitely get back to this one once I'm done (this isn't meant to ward off anyone who may want to tackle this on their own). I estimate it will take me an additional couple of weeks to complete. |
Thanks for bringing us up to speed, @mikiher. I would have tried my luck if no one else was working on it. Let me know if you need support for testing your work/implementation. |
this nice,What's the latest |
Describe the feature/enhancement
For reverse proxy usage with a subfolder instead of a subdomain. E.g.,
/audiobookshelf/
instead of/
.The text was updated successfully, but these errors were encountered: