Custom multiple routes for single domain with different containers #130

Closed
opened 2025-12-29 09:23:30 +01:00 by adam · 5 comments
Owner

Originally created by @A-SOM on GitHub (Dec 27, 2025).

Hello. I'm thrilled with your product and would even sponsor a cup of coffee :)

But I ran into a problem when I tried setting up multiple containers on a single domain for endpoint routing. I couldn't get it to work. Could you tell me how?

Originally created by @A-SOM on GitHub (Dec 27, 2025). Hello. I'm thrilled with your product and would even sponsor a cup of coffee :) But I ran into a problem when I tried setting up multiple containers on a single domain for endpoint routing. I couldn't get it to work. Could you tell me how?
adam closed this issue 2025-12-29 09:23:30 +01:00
Author
Owner

@yusing commented on GitHub (Dec 27, 2025):

First of all, do not suggest path based routing. Subdomains based routing is the go-to.

You can't use labels for this use case cuz you cannot alter properties of another route.

What is your use case? Frontend + backend API (two containers) within the same domain, or multiple irrelevant containers?

@yusing commented on GitHub (Dec 27, 2025): First of all, do not suggest path based routing. Subdomains based routing is the go-to. You can't use labels for this use case cuz you cannot alter properties of another route. What is your use case? Frontend + backend API (two containers) within the same domain, or multiple irrelevant containers?
Author
Owner

@A-SOM commented on GitHub (Dec 27, 2025):

I am use unraid and want install sdoc on my seafiles.
i am need proxy pass sdoc container -> / to domain seafiles -> path /sdoc-server
i think nice to have, if i can add label:
seafiles:

proxy.aliases: files
proxy.#1.port: 80

sdoc:

proxy.aliases: files
proxy.#1.port: 80
proxy.aliases_path: /sdoc-server 

proxy.aliases_path - default - /

I don't see any other way right now than to create my own Docker image for intranet proxying with domain binding. If godoxy could do this as a traffic source, that would be really cool.

@A-SOM commented on GitHub (Dec 27, 2025): I am use unraid and want install sdoc on my seafiles. i am need proxy pass sdoc container -> / to domain seafiles -> path /sdoc-server i think nice to have, if i can add label: seafiles: ``` proxy.aliases: files proxy.#1.port: 80 ``` sdoc: ``` proxy.aliases: files proxy.#1.port: 80 proxy.aliases_path: /sdoc-server ``` proxy.aliases_path - default - / I don't see any other way right now than to create my own Docker image for intranet proxying with domain binding. If godoxy could do this as a traffic source, that would be really cool.
Author
Owner

@A-SOM commented on GitHub (Dec 27, 2025):

When I used Nginx before, I could proxy using rewrite and close certain website elements. This was convenient with minio, for example. Therefore, Nginx's rewrite functionality is fundamentally convenient for routing.

@A-SOM commented on GitHub (Dec 27, 2025): When I used Nginx before, I could proxy using rewrite and close certain website elements. This was convenient with minio, for example. Therefore, Nginx's rewrite functionality is fundamentally convenient for routing.
Author
Owner

@yusing commented on GitHub (Dec 29, 2025):

currently GoDoxy does not have a good support for this use case, but doable:

  1. Expose those two routes normally as seafile_real and sdoc
  2. Create a new route in a route file
seafile:
  port: 999 # any port that is not used by godoxy (80 and 443)
  healthcheck:
    disable: true # port 999 is a fake port and will always be considered unhealthby, just disable it
  rules:
    - on: path glob(/sdoc-server/*)
      do: proxy http://sdoc.yourdomain.com
    - name: default
      do: proxy http://seafile_real.yourdomain.com

To add support for this, it will be something like:

seafile:
  rules_only: true
  rules:
    - on: path glob(/sdoc-server/*)
      do: route sdoc
    - name: default
      do: route seafile_real
@yusing commented on GitHub (Dec 29, 2025): currently GoDoxy does not have a good support for this use case, but doable: 1. Expose those two routes normally as `seafile_real` and `sdoc` 2. Create a new route in a route file ```yaml seafile: port: 999 # any port that is not used by godoxy (80 and 443) healthcheck: disable: true # port 999 is a fake port and will always be considered unhealthby, just disable it rules: - on: path glob(/sdoc-server/*) do: proxy http://sdoc.yourdomain.com - name: default do: proxy http://seafile_real.yourdomain.com ``` To add support for this, it will be something like: ```yaml seafile: rules_only: true rules: - on: path glob(/sdoc-server/*) do: route sdoc - name: default do: route seafile_real ```
Author
Owner

@A-SOM commented on GitHub (Dec 29, 2025):

Thanks. i am up nginx as reverse proxy :)

@A-SOM commented on GitHub (Dec 29, 2025): Thanks. i am up nginx as reverse proxy :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/godoxy#130