Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Custom domain for the project #216

Closed
konklone opened this issue Dec 4, 2013 · 10 comments
Closed

Custom domain for the project #216

konklone opened this issue Dec 4, 2013 · 10 comments

Comments

@konklone
Copy link
Contributor

konklone commented Dec 4, 2013

It's cool that the URL prominently advertises the government is using Github, but it also makes the permanence of the URL dependent on the project's continued use of Github (and Github's continued existence).

What about a custom domain? Github Pages makes this pretty easy.

@philipashlock
Copy link
Contributor

👍

It would also make it more authoritative.

@waldoj
Copy link

waldoj commented Dec 4, 2013

I've been thinking this, too. Hosting this at a .gov TLD would lend some weight to it.

@benbalter
Copy link
Contributor

👍

Would just need to CNAME the domain to point to pages, and then add a CNAME file to the repo with the custom domain name.

@konklone
Copy link
Contributor Author

konklone commented Dec 5, 2013

And for anyone watching who's not familiar, it can be a new subdomain of an existing .gov TLD just as easily as a new domain.

@philipashlock
Copy link
Contributor

I'd suggest that instead of this being on a new domain or new subdomain it should ultimately be on an existing domain using a basic proxy pass through. This would allow a URL like whitehouse.gov/opendata to proxy to this github pages content without creating yet another .gov or .gov subdomain. It's not like the whitehouse.gov domain name hasn't already been used to host basic content like this that's not part of the main whitehouse.gov CMS. This could be done with something like ProxyPass on Apache, proxy_pass on nginx, or perhaps something a little more sophisticated. It's also something that can be done by most systems that provide caching, eg Varnish, Squid, Akamai, Amazon CloudFront, etc. With something like CloudFront you can create all the configuration necessary to do something like this in about fifteen minutes from within a web browser and you don't need to write a line of code.

That said, if you're moving to something like this it might still make sense to stand up a subdomain and do the proxy off of that. This would also you to take advantage of the automatic redirects from the old github URL - though I guess you'd have to use client side redirection to get to the proper URL.

This is all to stay that standing up a subdomain makes sense, but I think it would still be more of an interim solution than the ideal one.

With Apache, it's generally pretty simple to proxy like this:

ProxyPass

The directive ProxyPass allows remote servers to be mapped into the space of the local server; the local server does not act as a proxy in the conventional sense, but appears to be a mirror of the remote server.

Suppose the local server has address http://wibble.org/; then

   ProxyPass /mirror/foo/ http://foo.com/

will cause a local request for the <http://wibble.org/mirror/foo/bar> to be internally converted into a proxy request to <http://foo.com/bar>.

ProxyPassReverse

The directive ProxyPassReverse lets Apache adjust the URL in the Location header on HTTP redirect responses. For instance this is essential when Apache is used as a reverse proxy to avoid by-passing the reverse proxy because of HTTP redirects on the backend servers which stay behind the reverse proxy.

Suppose the local server has address http://wibble.org/; then

   ProxyPass /mirror/foo/ http://foo.com/
   ProxyPassReverse  /mirror/foo/ http://foo.com/

will not only cause a local request for the <http://wibble.org/mirror/foo/bar> to be internally converted into a proxy request to <http://foo.com/bar> (the functionality ProxyPass provides here). It also takes care of redirects the server foo.com sends: when http://foo.com/bar is redirected by him to http://foo.com/quux Apache adjusts this to http://wibble.org/mirror/foo/quux before forwarding the HTTP redirect response to the client.

Source: http://www.akadia.com/services/apache_redirect.html

@gbinal
Copy link
Contributor

gbinal commented Jan 28, 2014

👍

gbinal added a commit that referenced this issue Sep 8, 2014
@gbinal
Copy link
Contributor

gbinal commented Sep 11, 2014

This is now set up - https://project-open-data.cio.gov

@gbinal gbinal closed this as completed Sep 11, 2014
@waldoj
Copy link

waldoj commented Sep 11, 2014

🇺🇸

@konklone
Copy link
Contributor Author

konklone commented Oct 2, 2014

Awesome! But I do think this ticket is not really resolved until:

I'll do a PR for the second and third ones, but an owner of the repo needs to do the first one.

@gbinal
Copy link
Contributor

gbinal commented Oct 2, 2014

Great points - thanks a bunch, @konklone.

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

No branches or pull requests

5 participants