TritonDataCenter / manta

Manta is a scalable HTTP-based object store
Mozilla Public License 2.0
610 stars 65 forks source link

CNAME/Virtual Hosting support #6

Open AlainODea opened 9 years ago

AlainODea commented 9 years ago

I would like to be able to to map my own custom domain to content in Manta.

Visiting http://blog.alainodea.com/ would act like visiting https://us-east.manta.joyent.com/blog.alainodea.com/public/index.html.

I would have blog.alainodea.com as a username in JPC/SDC.

My alainodea.com zone in BIND would have a CNAME record like this:

blog IN CNAME us-east.manta.joyent.com

An example HTTP request through a CNAME would be:

GET / HTTP/1.1
Host: blog.alainodea.com

The Manta server would check if the Host header matches its own FQDN. If so it acts normally. If not, it does the following:

  1. Treat path as if it begins with /{Host}/public
  2. If resulting path is a directory in Manta try to load index.html from that directory. (404 is natural outcome if it is missing)

Caveats:

Advantages:

davepacheco commented 9 years ago

This is a nice idea, and I know @mcavage considered something like this a long time ago. Realistically, I'm not sure when we'll be able to spend much time on it.

AlainODea commented 9 years ago

Makes sense. I can always stand up a proxy in front of Manta to achieve this. It would be nice as an option for ultra low-cost hosting, but that's hardly a high margin business ;)

andrew-wharton commented 9 years ago

+1. This is a nice feature of S3 for hosting static content that would be much appreciated. It would be awesome to be able to migrate content from S3 to Manta and not break existing links.

grigorov commented 9 years ago

+1

no result?

davepacheco commented 9 years ago

There's no objection. There's just nobody signed up to work on this. If someone's interested in starting, the first step would probably be to send out a detailed RFD.