So I’ve got a couple of services that I access using mydomain.org:1234 for example, but since Nextcloud runs its own web server it’s hosted on mydomain.org/nextcloud.

How do I set up my services so I can access them from a friendly URI like Nextcloud instead of ports?

@forwardvoid@feddit.nl
link
fedilink
English
41Y

I would suggest using Caddy. I think it’s a little simpler than Traefik and can automatically handle LetsEncrypt SSL/TLS certificates for you

@IsoKiero@sopuli.xyz
link
fedilink
English
11Y

You want a reverse proxy. But if nextcould is already reserving ports 80/443 you need a bit more configuration as it’s not possible for multiple processes to use the same port.

@drkt@feddit.dk
link
fedilink
English
11Y

Reverse proxy maybe?

mydomain.org/nextcloud gets reverse-proxied to mydomain.org:1234 and will appear as the former.

OCT0PUSCRIME
link
fedilink
English
21Y

Yep this is the way. What OP wants can’t be done with DNS.

Bolle
link
fedilink
English
11Y

if you are using docker/podman you can use e.g traefik reverse proxy.

if you don’t use docker you Have to move those Services behind an apache/nginx/haproxy reverse proxy.

@VonReposti@feddit.dk
link
fedilink
English
11Y

Setup a reverse proxy and configure it to redirect yourdomain.org/nextcloud (or nextcloud.yourdomain.org) to a custom port that you’re now running Nextcloud on. Then configure some-random-service which you want at yourdomain.org/some-random-service to redirect to port 1234 and so on.

This means all incoming connections on port 80 and 443 now will be handled by your reverse proxy and depending on the requested URL, the reverse proxy will fetch the desired website contents from the origin web server. I personally use nginx but there exists other good reverse proxies you can use.

@Decronym@lemmy.decronym.xyz
bot account
link
fedilink
English
11Y

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
HTTP Hypertext Transfer Protocol, the Web
SSL Secure Sockets Layer, for transparent encryption
TLS Transport Layer Security, supersedes SSL
nginx Popular HTTP server

[Thread #186 for this sub, first seen 4th Oct 2023, 18:55] [FAQ] [Full list] [Contact] [Source code]

@Vendetta9076@sh.itjust.works
link
fedilink
English
1
edit-2
1Y

Depends on how your infra is setup but if you’re using a reverse proxy you can do it fairly easily. This example is assuming cloudflare as its what I use.

Go into cloudflare -> dns then add cname records for your services. The cname record should be service.mydomain.com. Then all you gotta do is tell your proxy what that cname points to. Gonna be honest, been using truenas scale for a while and it does it differently that straight docker which I assume you’re using so I probably wont be much more help but it should at least get you started. If you aren’t using a reverse proxy, you should definitely start. Look up Traefik.

@merthyr1831@lemmy.world
creator
link
fedilink
English
91Y

Okay so TLDR I’ll need to set up a reverse proxy. Thanks folks!

Create a post

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!

  • 1 user online
  • 219 users / day
  • 442 users / week
  • 1.15K users / month
  • 3.85K users / 6 months
  • 1 subscriber
  • 3.71K Posts
  • 74.7K Comments
  • Modlog