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

idea: make portal subsites accessible by hostname and url from the main site #51

Open
usernamenumber opened this issue Apr 19, 2015 · 0 comments

Comments

@usernamenumber
Copy link
Contributor

Currently (at least once the branch I'm working on has been merged), sites like edx are accessible as edx.testsite.tunapanda.org ("testsite.tunapanda.org" is jut the default fqdn for the provisioned machine for now). This only works if the person viewing the site is using x2go for dns, which is the case for all the use cases we're considering, but an alternative would be nice.

This issue is mostly just to note to myself that this can be done with something like the following, but it's not important enough to spend time on at the moment. Now that it's recorded here, someone can come back to it later. Or not.

  ## For this to work, the nginx-extras package must be installed!
  location /edx {
        # When content is returned, rewrite absolute URLs in the page content
        subs_filter src="/(?!/) src="http://testsite.tunapanda.org/edx/ r;
        subs_filter href="/(?!/) href="http://testsite.tunapanda.org/edx/ r;

        # Pass the request to the actual site. 
        # (*.testsite.tunapanda.org resolves to the server's IP)
        resolver 127.0.0.1;
        proxy_pass http://edx.testsite.tunapanda.org/;
  }
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

1 participant