Skip to content
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

Different domains to different ports on the same container for ssl support #1165

Open
myleshyson opened this issue May 4, 2024 · 0 comments
Labels
t/feature New feature

Comments

@myleshyson
Copy link

Ok forgive me if this is something that is already possible. I couldn't find anything about this in the documentation.

I'm having an issue getting vitejs running on a php container to resolve https requests using orbstack domains and automatic ssl.

Here's my setup. The php container has a php server listening on port 80. The php container also has a vitejs server, and when it's started, that's listening on port 5173. I defined a custom orbstack domain called laravel.orb.local, and have dev.orbstack.http-port=80.

Visiting https://laravel.orb.local the php server listening on port 80 responds fine. However, when I start the vite server and visit https://laravel.orb.local:5173, I get certificate errors in the browser. I'm guessing this is because of how orbstack is proxying 443 requests.

I noticed however that if I set the http port to dev.orbstack.http-port=5173, then when I visit https://laravel.orb.local the vite server responds just fine.

So this got me thinking, it would be nice to have the option to map multiple domains to different ports on the same container so that the automatic https feature for orbstack just works. My assumption is that if I can communicate to the orbstack proxy server which port to forward to for a given container, then it'll resolve the cert issue I'm having.

I think something like this might be nice

labels:
  dev.orbstack.domains: laravel.orb.local@80, vite.laravel.orb.local@5173

Again kinda shooting in the dark here but my guess is that if the above were defined, then I can visit https://laravel.orb.local AND visit https://vite.laravel.orb.local without any cert errors. With the above syntax I'm not even sure if dev.orbstack.http-port would be needed anymore.

@myleshyson myleshyson added the t/feature New feature label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant