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

Can Actix assign subdomains? #971

Closed
Th3Whit3Wolf opened this issue Jul 11, 2019 · 3 comments
Closed

Can Actix assign subdomains? #971

Th3Whit3Wolf opened this issue Jul 11, 2019 · 3 comments

Comments

@Th3Whit3Wolf
Copy link

The title says it all I've been using actix as a web server for a little while now and I'd like to use it for an actual website. I was wondering if

  1. actix has the ability to make and handle subdomain
  2. if this is something the project would be interested in
  3. if I should use nginx to handle the subdomain and use actix with that
@sonfangos
Copy link

Surely the simplest solution here is 3: spin off the stuff you want served up from the subdomain into a new app bound to a different port, then tie this app to the subdomain via a new server block in nginx.

@Th3Whit3Wolf
Copy link
Author

Awesome thank you! Also Actix rocks! I read through your examples for rustls, aksama templates, diesel, cookie-session, etc and has helped a lot with my web developement on rust.

@ZaneHannanAU
Copy link

From what I can tell, including a servername builder (with https://docs.rs/openssl/0.10.26/openssl/ssl/struct.SslAcceptorBuilder.html#method.set_servername_callback or similarly https://docs.rs/rustls/0.16.0/rustls/trait.ResolvesServerCert.html) ... the amount of setup required may warrant a library wrapper.

I was also looking at how to do this (along with actix/actix-net#13) and have almost found a way... based on https://old.reddit.com/r/rust/comments/cog1hz/help_a_way_to_read_the_requested_domain_name_from/?context=3

I'm a little late but I'm hoping to find some answers, and perhaps put together a library to wrap them all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants