Skip to content

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

@usernamenumber

Description

@usernamenumber

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/;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions