this post was submitted on 17 Jun 2023
16 points (100.0% liked)

Selfhosted

39980 readers
450 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Hi! I want to self host lemmy on my homelab. I have a lot of services installed but only a couple of them are exposed on the internet using subpaths like host.com/plex or host.com/nextcloud.

I want to do the same with lemmy, so host.com/lemmy. Does lemmy support this particular URL configuration? Thank you!

top 4 comments
sorted by: hot top controversial new old
[–] slashzero@hakbox.social 5 points 1 year ago* (last edited 1 year ago)

You might be able to setup a mod_rewrite rule to load a specific file path or other url based on the URL path, but a subdomain would probably be easier/cleaner.

From Apache mod_rewrite docs:

The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch.

Just remember the old adage about regular expressions: when you use a regular expression to try to solve one problem, you create two problems.

A subdomain would likely be cleaner and easier.

[–] 486@kbin.social 4 points 1 year ago* (last edited 1 year ago) (2 children)

From a security point of view it is not a good idea to host multiple web applications in sub directories on the same hostname. With such a configuration, every application sees all cookies from all other applications. This also means that you can have collisions of cookie names between applications if the names are not unique.

So if one application would get compromised, it could easily steal all your sessions for all other applications.

[–] gabriele97@lemmy.world 1 points 1 year ago

Oh, I didn't think about that!

[–] gabriele97@lemmy.world 1 points 1 year ago

Oh, I didn't think about that!

load more comments
view more: next ›