the fast, reliable localhost tunneling solution


Direct Backend to subfolder

2011-08-13, 02:20

In configuration file, I use backend=http:familytree.pagekite.me:localhost:8080:[my secrete], and when when I access my pagekite, it is directed to my http://localhost:8080.

I want to direct the back end to http://localhost:8080/openmrs/ instead.

I tried the configuration file in following ways, but still directed to tomcat root, not openmrs directory.

backend=http:familytree.pagekite.me:localhost:8080/openmrs:[my secrete] backend=http:familytree.pagekite.me:localhost:8080/openmrs/:[my secrete] backend=http:familytree.pagekite.me:localhost:8080:openmrs:[my secrete]

Please tell me how can I direct it to the subdirectory?

Comments

  1. Bjarni Rúnar Einarsson said on 2011-08-14, 08:31
    PageKite does not currently rewrite URL paths, it passes the request entirely unmodified to the HTTP server. This is by design - PageKite tries to interfere with the communication between the client and server as little as possible, and PageKite tries to reinvent as few wheels as possible.

    Apache can already do what you want using Virtual Hosts (port or name based) and/or mod_rewrite. Instead of using a subfolder, put the openmrs stuff on its own port or give it a DNS name of it's own, and then configure that as a PageKite back-end. This setup has the added bonus that your server configuration will work locally without PageKite (you can put yourname.pagekite.me in /etc/hosts for example and communicate directly).
    Permalink
  2. JonD said on 2012-06-08, 14:43
    Does that mean that
    $ pagekite.py http://myname.pagekite.me/sub foo.pagekite.me
    does not work to have direct access to the sub folder? When I used that command, it claims the server is down.

    If I use:
    $ pagekite.py http://myname.pagekite.me foo.pagekite.me
    and browse to
    http://myname.pagekite.me/sub
    it works.

    JonD

    Permalink
  3. Bjarni Rúnar Einarsson said on 2012-06-08, 15:09
    Jon, those command lines don't really make sense. The syntax of pagekite.py is like so:

    $ pagekite.py THING ADDRESS

    ...where THING can be a local port or folder, and ADDRESS is the name of the kite you want to fly. If you expose a folder using a command like:

    $ pagekite.py /path/to/folder yourname.pagekite.me

    And the folder contains a subfolder named blah, you will be able to access the subfolder as http://yourname.pagekite.me/blah/. You don't need to explicitly list the sub-folder for this to happen, it is automatic.

    Hope this helps!
    Permalink
  4. JonD said on 2012-06-08, 18:51
    Understood...

    My ownCloud was installed in /var/www/ownCloud and I was just trying to map directly to it rather than the root localhost.

    JonD
    Permalink
  5. JonD said on 2012-06-08, 19:10
    Understood...

    My ownCloud was installed in /var/www/ownCloud and I was just trying to map directly to it rather than the root localhost.

    JonD
    Permalink
  6. Bjarni Rúnar Einarsson said on 2012-06-09, 01:44
    If you are running localhost, then you need to point PageKite at the local port of the web server, not the folder containing the data. So something like:

    $ pagekite.py 80 yourname.pagekite.me

    The OwnCloud documentation in the wiki has more details. :-)
    Permalink
  7. Bjarni Rúnar Einarsson said on 2012-06-09, 01:44
    Oops, I meant "If you are running OwnCloud ...", not "localhost". Sorry about the confusion.
    Permalink

Leave a comment

( (Please leave these blank: )

We use Gravatar for commenter's photos. Get your own, it's free!