[Enhancement]: Add subfolder URL path instead of using a subdomain #218

Closed
opened 2026-04-24 23:01:18 +02:00 by adam · 39 comments
Owner

Originally created by @maartenbrakkee on GitHub (Mar 1, 2022).

Describe the feature/enhancement

For reverse proxy usage with a subfolder instead of a subdomain. E.g., /audiobookshelf/ instead of /.

Originally created by @maartenbrakkee on GitHub (Mar 1, 2022). ### Describe the feature/enhancement For reverse proxy usage with a subfolder instead of a subdomain. E.g., `/audiobookshelf/` instead of `/`.
adam added the enhancement label 2026-04-24 23:01:18 +02:00
adam closed this issue 2026-04-24 23:01:18 +02:00
Author
Owner

@unclebacon-live commented on GitHub (Mar 7, 2022):

I second this.

@unclebacon-live commented on GitHub (Mar 7, 2022): I second this.
Author
Owner

@whiskywaffel commented on GitHub (Mar 9, 2022):

Would be a nice. Is there any chance this gets implemented?

@whiskywaffel commented on GitHub (Mar 9, 2022): Would be a nice. Is there any chance this gets implemented?
Author
Owner
@sandreas commented on GitHub (May 7, 2022): +1 I would suggest to use `process.env.serverUrl` wherever possible... Maybe it helps collecting code permalinks, that maybe need to be adjusted? **Probably (server and client-config):** - https://github.com/advplyr/audiobookshelf/blob/f34ebdc016f05d3ee3dd3653dc63cbaa15b35207/server/Server.js#L185 - https://github.com/advplyr/audiobookshelf/blob/f34ebdc016f05d3ee3dd3653dc63cbaa15b35207/client/nuxt.config.js#L31 **Maybe (client):** - https://github.com/advplyr/audiobookshelf/blob/f34ebdc016f05d3ee3dd3653dc63cbaa15b35207/client/pages/index.vue#L8 - https://github.com/advplyr/audiobookshelf/blob/f34ebdc016f05d3ee3dd3653dc63cbaa15b35207/client/pages/login.vue#L40 What about the app?
Author
Owner

@sandreas commented on GitHub (May 31, 2022):

@advplyr

How is the state of this issue? You said in #570:

we need to add a base url from env variables for the client side to work. Then there is the server and mobile apps. I've attempted to add this once before and it was more complicated then it seems.

So there is work to do in:

  • Client
  • Server
  • Mobile Apps

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.

@sandreas commented on GitHub (May 31, 2022): @advplyr How is the state of this issue? You said in #570: > we need to add a base url from env variables for the client side to work. Then there is the server and mobile apps. I've attempted to add this once before and it was more complicated then it seems. So there is work to do in: - Client - Server - Mobile Apps 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.
Author
Owner

@advplyr commented on GitHub (Jun 1, 2022):

Thanks, I could use some help.
The first step is the base url will need to be passed in as an environment variable for docker or specified in the config file for debian.

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.
The mobile apps would need to store the base url separately. I haven't gotten too deep into this since I got hung up on the web app client.

We can chat about this in discord also if that is easier or start a discussion in GH whichever you prefer.

@advplyr commented on GitHub (Jun 1, 2022): Thanks, I could use some help. The first step is the base url will need to be passed in as an environment variable for docker or specified in the config file for debian. 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. The mobile apps would need to store the base url separately. I haven't gotten too deep into this since I got hung up on the web app client. We can chat about this in discord also if that is easier or start a discussion in GH whichever you prefer.
Author
Owner

@sandreas commented on GitHub (Jun 1, 2022):

Progress update:

@sandreas commented on GitHub (Jun 1, 2022): Progress update: - First steps to integrate `BASE_URL` into the `/server` component: https://github.com/advplyr/audiobookshelf/compare/master...sandreas:master - Got the client working - some issues with logos and audio files, but I got a user interface for the client, client changes will follow and are currently NOT part of the fork
Author
Owner

@advplyr commented on GitHub (Jun 1, 2022):

Oh great, how are you passing the env variable to the nuxt app?

@advplyr commented on GitHub (Jun 1, 2022): Oh great, how are you passing the env variable to the nuxt app?
Author
Owner

@sandreas commented on GitHub (Jun 1, 2022):

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 router and baseUrl:

  router: {
    base: '/audiobooks'
  },
  axios: {
    // baseURL: process.env.serverUrl || ''
    baseURL: "/audiobooks/"
  },

The nuxt-config is very fiddly here. A missing / or one too much at the wrong place and it does not work at all. Seems that this is influenced by the server config in dev.js / index.js. I'm not even sure, wether that default value for BASE_URL should be `` (empty string) or / (slash).

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: https://github.com/nuxt/nuxt.js/pull/7312 which might help to configure it runtime, so that one does not need to retranspile the whole client for changing the baseUrl.

Maybe BASE_URL should also be renamed to PREFIX (like here), since we only wanna change the last part of the url... we'll see, I'm pretty busy atm, maybe this takes some time to figure out.

@sandreas commented on GitHub (Jun 1, 2022): > 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 `router` and `baseUrl`: ``` router: { base: '/audiobooks' }, axios: { // baseURL: process.env.serverUrl || '' baseURL: "/audiobooks/" }, ``` The `nuxt`-config is very fiddly here. A missing `/` or one too much at the wrong place and it does not work at all. Seems that this is influenced by the server config in `dev.js` / `index.js`. I'm not even sure, wether that default value for `BASE_URL` should be `` (empty string) or `/` (slash). 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: https://github.com/nuxt/nuxt.js/pull/7312 which might help to configure it runtime, so that one does not need to retranspile the whole client for changing the `baseUrl`. Maybe `BASE_URL` should also be renamed to `PREFIX` (like [here](https://axios.nuxtjs.org/options/#prefix-host-and-port)), since we only wanna change the last part of the url... we'll see, I'm pretty busy atm, maybe this takes some time to figure out.
Author
Owner

@advplyr commented on GitHub (Jun 2, 2022):

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.

@advplyr commented on GitHub (Jun 2, 2022): 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.
Author
Owner

@sandreas commented on GitHub (Jun 2, 2022):

Prefix is better since that is all we want passed into the env variable.

Ok, I'll regard that. Currently it is an experiment - not a working thing. Maybe I have to rethink everthing.

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.

I'm aware of this. I would prefer this

router: {
  base: ""
},
axios: {
  baseURL: ""
},

because without a leading slash using relative references it would work everywhere without any runtime changes or variables. It seems that nuxt does not allow `` (empty string) and replaces it with /. I would see that as a nuxt bug, because it makes a very important feature unusable - REAL relative paths.

Instead of using /_nuxt/0sdrcie.js it would use _nuxt/0sdrcie.js, result:

That is what I am investigating.

Here are some links:

@sandreas commented on GitHub (Jun 2, 2022): > Prefix is better since that is all we want passed into the env variable. Ok, I'll regard that. Currently it is an experiment - not a working thing. Maybe I have to rethink everthing. > 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. I'm aware of this. I would prefer this ``` router: { base: "" }, axios: { baseURL: "" }, ``` because without a leading slash using relative references it would work everywhere without any runtime changes or variables. It seems that `nuxt` does not allow `` (empty string) and replaces it with `/`. I would see that as a `nuxt` bug, because it makes a very important feature unusable - REAL relative paths. Instead of using `/_nuxt/0sdrcie.js` it would use `_nuxt/0sdrcie.js`, result: - http://mydomain.com/audiobooks/index.html + /_nuxt/0sdrcie.js => http://mydomain.com/_nuxt/0sdrcie.js - http://mydomain.com/audiobooks/index.html + _nuxt/0sdrcie.js => http://mydomain.com/audiobooks/_nuxt/0sdrcie.js That is what I am investigating. Here are some links: - https://github.com/nuxt/nuxt.js/issues/2892 - https://github.com/nuxt/nuxt.js/issues/1052 - https://stackoverflow.com/questions/53851269/nuxt-axios-dynamic-url
Author
Owner

@advplyr commented on GitHub (Jun 18, 2022):

@sandreas I missed your last comment here. Are you still working on this? I can look into this today

@advplyr commented on GitHub (Jun 18, 2022): @sandreas I missed your last comment here. Are you still working on this? I can look into this today
Author
Owner

@sandreas commented on GitHub (Jun 19, 2022):

@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 commented on GitHub (Jun 19, 2022): @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 ;)
Author
Owner

@advplyr commented on GitHub (Jun 19, 2022):

@sandreas Congrats! Thanks for the update

@advplyr commented on GitHub (Jun 19, 2022): @sandreas Congrats! Thanks for the update
Author
Owner

@RocketRammer commented on GitHub (Jul 13, 2022):

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.

@RocketRammer commented on GitHub (Jul 13, 2022): 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.
Author
Owner

@sandreas commented on GitHub (Jul 13, 2022):

@RichardMawdsley

Hope your new son is doing well @sandreas!

Yeah he is alright thank you.

He must be sleeping through the night and barely disturbing you, right?.. right!? :D

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.

@sandreas commented on GitHub (Jul 13, 2022): @RichardMawdsley > Hope your new son is doing well @sandreas! Yeah he is alright thank you. > He must be sleeping through the night and barely disturbing you, right?.. right!? :D 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.
Author
Owner

@1nVitr0 commented on GitHub (Apr 22, 2023):

Am I correct in the assumption, that this is already implemented using ROUTER_BASE_PATH, but doesn't get picked up by nuxtjs? (Whis is because nuxt has been compiled to static files)

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?

@1nVitr0 commented on GitHub (Apr 22, 2023): Am I correct in the assumption, that this is already implemented using `ROUTER_BASE_PATH`, but doesn't get picked up by nuxtjs? (Whis is because nuxt has been compiled to [static](https://github.com/advplyr/audiobookshelf/blob/dadd41cb5c221c8c79f1a26a0bebd3d740b51539/client/nuxt.config.js#L6) files) 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?
Author
Owner

@advplyr commented on GitHub (Apr 22, 2023):

Am I correct in the assumption, that this is already implemented using ROUTER_BASE_PATH, but doesn't get picked up by nuxtjs? (Whis is because nuxt has been compiled to static files)

Correct. The server side part should be good to go although I haven't tested that env variable in a while.

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?

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.

@advplyr commented on GitHub (Apr 22, 2023): > Am I correct in the assumption, that this is already implemented using `ROUTER_BASE_PATH`, but doesn't get picked up by nuxtjs? (Whis is because nuxt has been compiled to [static](https://github.com/advplyr/audiobookshelf/blob/dadd41cb5c221c8c79f1a26a0bebd3d740b51539/client/nuxt.config.js#L6) files) Correct. The server side part should be good to go although I haven't tested that env variable in a while. > 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? 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.
Author
Owner

@advplyr commented on GitHub (Apr 22, 2023):

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.

@advplyr commented on GitHub (Apr 22, 2023): 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.
Author
Owner

@1nVitr0 commented on GitHub (Apr 22, 2023):

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.

@1nVitr0 commented on GitHub (Apr 22, 2023): 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.
Author
Owner

@1nVitr0 commented on GitHub (Apr 24, 2023):

Right. After a little fiddling and digging through nuxtjs changelogs, I have come to the following conclusion:

  • NuxtJS does NOT natively support a dynamic base path when using a static build target
  • Options to get around this I came up with:
    1. Recompiling the target when the base path changes
    2. Running nuxt using node directly and proxying express requests to it (alternatively using nginx or similar around it)
    3. Running Nuxt programatically (as @advplyr suggested)
    4. Manually updating the build files when the base path changes

I think they all have their pros and cons

  • i. is robust and includes minimal code changes, but bloats the docker image with nuxt dependencies and drastically slows down startup. Also depending on the nuxt dependencies, it might struggle with cross-platform
  • ii. is robust, efficient and doesn't bloat the docker image very much, as nuxtjs can compile it's dependencies into the build. But it requires some drastic code changes, as we can no longer rely on the static serving of files to detect the request's targets
  • iii is robust, efficient and doesn't bloat the docker image very much, as nuxtjs can compile it's dependencies into the build. But it requires some code changes, as nuxt is used as a middleware, this might also need some work when running the client independently
  • iv. requires minimal code changes, is very efficient and minimally impacts startup performance. But it relies on nuxt compiling into a known structure and may break when updating to a new version

I am currently dabbling with iv. as a temporary solution. That does seem to work until the login screen, after which my version currently crashes. (It does not connect to the websocket, so that may be the issue). For a permanent solution, I think either i. ii or iii. are fine, although I personally lean towards iii. / ii as node is used for the rest of the application anyways. ii. would give somewhat more freedom when running client and server independently, iii might be easier to integrate into express and only runs as a single instance.


Update

I 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.

@1nVitr0 commented on GitHub (Apr 24, 2023): Right. After a little fiddling and digging through nuxtjs changelogs, I have come to the following conclusion: - NuxtJS does [NOT natively support](https://github.com/nuxt/nuxt/pull/8520) a dynamic base path when using a static build target - Options to get around this I came up with: 1. Recompiling the target when the base path changes 2. Running nuxt using node directly and proxying express requests to it (alternatively using nginx or similar around it) 3. Running Nuxt programatically (as @advplyr suggested) 4. Manually updating the build files when the base path changes I think they all have their pros and cons - `i.` is robust and includes minimal code changes, but bloats the docker image with nuxt dependencies and drastically slows down startup. Also depending on the nuxt dependencies, it might struggle with cross-platform - `ii.` is robust, efficient and doesn't bloat the docker image very much, as nuxtjs can compile it's dependencies into the build. But it requires some drastic code changes, as we can no longer rely on the static serving of files to detect the request's targets - `iii` is robust, efficient and doesn't bloat the docker image very much, as nuxtjs can compile it's dependencies into the build. But it requires some code changes, as nuxt is used as a middleware, this might also need some work when running the client independently - `iv.` requires minimal code changes, is very efficient and minimally impacts startup performance. But it relies on nuxt compiling into a known structure and may break when updating to a new version I am currently dabbling with `iv.` as a temporary solution. That does seem to work until the login screen, after which my version currently crashes. (It does not connect to the websocket, so that may be the issue). For a permanent solution, I think either `i.` `ii` or `iii.` are fine, although I personally lean towards `iii.` / `ii` as `node` is used for the rest of the application anyways. `ii.` would give somewhat more freedom when running client and server independently, `iii` might be easier to integrate into express and only runs as a single instance. *** ## Update I 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.
Author
Owner

@Danathar commented on GitHub (Jul 2, 2023):

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.

@Danathar commented on GitHub (Jul 2, 2023): 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.
Author
Owner

@sandreas commented on GitHub (Jul 2, 2023):

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 (*.domain.com), which work perfectly fine on my system.

@sandreas commented on GitHub (Jul 2, 2023): > 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 (`*.domain.com`), which work perfectly fine on my system.
Author
Owner

@Danathar commented on GitHub (Jul 3, 2023):

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 (*.domain.com), which work perfectly fine on my system.

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.

@Danathar commented on GitHub (Jul 3, 2023): > > 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 (`*.domain.com`), which work perfectly fine on my system. 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.
Author
Owner

@MagiX13 commented on GitHub (Jul 15, 2023):

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

publicRuntimeConfig: {
    axios: {
      browserBaseURL: process.env.BROWSER_BASE_URL
    }
  },
privateRuntimeConfig: {
    axios: {
      baseURL: process.env.BASE_URL
    }
  }

Giving a bit more context on the runtime config from here

The runtime config has built-in dotenv support for better security and faster development. The runtime config is added to the Nuxt payload so there is no need to rebuild in order to update the runtime configuration...

@MagiX13 commented on GitHub (Jul 15, 2023): 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](https://axios.nuxtjs.org/options/#runtime-config) ``` publicRuntimeConfig: { axios: { browserBaseURL: process.env.BROWSER_BASE_URL } }, privateRuntimeConfig: { axios: { baseURL: process.env.BASE_URL } } ``` Giving a bit more context on the runtime config from [here](https://v2.nuxt.com/docs/directory-structure/nuxt-config#runtimeconfig) >The runtime config has built-in [dotenv ](https://github.com/motdotla/dotenv)support for better security and faster development. **The runtime config is added to the Nuxt payload so there is no need to rebuild in order to update the runtime configuration**...
Author
Owner

@advplyr commented on GitHub (Jul 15, 2023):

@MagiX13 That is for axios and not for nuxt which is generating all the paths during build. There is a detailed discussion in #1746

@advplyr commented on GitHub (Jul 15, 2023): @MagiX13 That is for axios and not for nuxt which is generating all the paths during build. There is a detailed discussion in #1746
Author
Owner

@gardiol commented on GitHub (Mar 26, 2024):

Is there any news on this? I would also like this feature if not yet implemented.

@gardiol commented on GitHub (Mar 26, 2024): Is there any news on this? I would also like this feature if not yet implemented.
Author
Owner

@gaarysn commented on GitHub (May 20, 2024):

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?

@gaarysn commented on GitHub (May 20, 2024): 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?
Author
Owner

@Danathar commented on GitHub (May 20, 2024):

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:

server {
    listen 80;
    server_name audiobookshelf.srv.server.com;

    location / {
        proxy_pass http://localhost:13378; # Replace with the port Audiobookshelf is running on
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

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.

@Danathar commented on GitHub (May 20, 2024): > 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: ``` server { listen 80; server_name audiobookshelf.srv.server.com; location / { proxy_pass http://localhost:13378; # Replace with the port Audiobookshelf is running on proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } ``` 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.
Author
Owner

@farfalleflickan commented on GitHub (Jun 18, 2024):

@1nVitr0 I do not mean to nag, but would it be possible to know the progress status on this?

@farfalleflickan commented on GitHub (Jun 18, 2024): @1nVitr0 I do not mean to nag, but would it be possible to know the progress status on this?
Author
Owner

@mikiher commented on GitHub (Oct 19, 2024):

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.

@mikiher commented on GitHub (Oct 19, 2024): 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.
Author
Owner

@4ch1m commented on GitHub (Nov 15, 2024):

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.
I'm just asking to avoid that someone interested (and maybe skilled) is hesitating to tackle the issue based on the false assumption that someone else is already half-way there.

Thanks!

@4ch1m commented on GitHub (Nov 15, 2024): After reading all the comments it's pretty obvious that this issue is a hard nut to crack. :smile: However, this also seems to be the [most requested](https://github.com/advplyr/audiobookshelf/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) feature at the moment. And although partial progress has been reported, plus @mikiher already compiled a very helpful [gist](https://github.com/advplyr/audiobookshelf/discussions/3535)... I'm still confused. :exploding_head: So... is anyone still actively working on this? :thinking: I don't want to be impatient or demanding. I'm just asking to avoid that someone interested (and maybe skilled) is hesitating to tackle the issue based on the false assumption that someone else is already half-way there. Thanks!
Author
Owner

@mikiher commented on GitHub (Nov 15, 2024):

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.

@mikiher commented on GitHub (Nov 15, 2024): 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.
Author
Owner

@4ch1m commented on GitHub (Nov 15, 2024):

Thanks for bringing us up to speed, @mikiher.
That's great to hear and much appreciated. 🙇

I would have tried my luck if no one else was working on it.
But I guess it would take me more than just a couple of weeks. 😏

Let me know if you need support for testing your work/implementation.

@4ch1m commented on GitHub (Nov 15, 2024): Thanks for bringing us up to speed, @mikiher. That's great to hear and much appreciated. :bow: I would have tried my luck if no one else was working on it. But I guess it would take me more than just a couple of weeks. :smirk: Let me know if you need support for testing your work/implementation.
Author
Owner

@iamckun commented on GitHub (Dec 19, 2024):

this nice,What's the latest

@iamckun commented on GitHub (Dec 19, 2024): this nice,What's the latest
Author
Owner

@mikiher commented on GitHub (Jan 9, 2025):

I submitted PR #3810 for review to enable subdirectory support.

Once this makes it to the server release, subdirectory access will be enabled on both server and web client.

Subdirectory support for the mobile app will also be enabled on the next mobile app release (audiobookshelf-app PR #1417).

@mikiher commented on GitHub (Jan 9, 2025): I submitted PR #3810 for review to enable subdirectory support. Once this makes it to the server release, subdirectory access will be enabled on both server and web client. Subdirectory support for the mobile app will also be enabled on the next mobile app release (audiobookshelf-app PR #1417).
Author
Owner

@github-actions[bot] commented on GitHub (Jan 20, 2025):

Fixed in v2.18.0.

@github-actions[bot] commented on GitHub (Jan 20, 2025): Fixed in [v2.18.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.18.0).
Author
Owner

@iamckun commented on GitHub (Jan 20, 2025):

/textures/wood_default.jpg 404

@iamckun commented on GitHub (Jan 20, 2025): /textures/wood_default.jpg 404
Author
Owner

@mikiher commented on GitHub (Jan 20, 2025):

@iamckun Thanks for reporting. Just sent a fix for review.

@mikiher commented on GitHub (Jan 20, 2025): @iamckun Thanks for reporting. Just sent a fix for review.
Author
Owner

@mikiher commented on GitHub (Jan 20, 2025):

A few notes for on subdirectory support, for those who have not read #3535:

  • Due to technical reasons (explained in #3535), you cannot change the subdirectory name (unless you override it in the code). It is hardcoded to be /audiobookshelf
  • As of v2.18.0, the server supports both legacy (no-subdirectory) and /audiobookshelf access.
  • As of v2.18.0, the web client will always use /audiobookshelf
  • Other existing clients should work seamlessly with server v2.18.0 using legacy (no-subdirectory) access.
  • As of v0.9.78, the mobile app also supports /audiobookshelf access. To connect to a server using /audiobookshelf, Add a new server with address https://<your-server-domain-and-port>/audiobookshelf

Please let me know here if you encounter any issues with this.

@mikiher commented on GitHub (Jan 20, 2025): A few notes for on subdirectory support, for those who have not read #3535: - Due to technical reasons (explained in #3535), you cannot change the subdirectory name (unless you override it in the code). It is hardcoded to be `/audiobookshelf` - As of v2.18.0, the server supports both legacy (no-subdirectory) and `/audiobookshelf` access. - As of v2.18.0, the web client will always use `/audiobookshelf` - Other existing clients should work seamlessly with server v2.18.0 using legacy (no-subdirectory) access. - As of v0.9.78, the mobile app also supports `/audiobookshelf` access. To connect to a server using `/audiobookshelf`, Add a new server with address `https://<your-server-domain-and-port>/audiobookshelf` Please let me know here if you encounter any issues with this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#218