installing mirror as subdirectory of webserver

19 views
Skip to first unread message

David Hoover

unread,
Sep 28, 2015, 12:30:29 PM9/28/15
to genome...@soe.ucsc.edu
Would it be possible to install a mirror of the UCSC Genome Browser as a
subdirectory of a webserver, rather than as the main host? That is,
instead of serving the browser as (for example)

http://my.server.com/index.html
http://my.server.com/cgi-bin/hgGateway

but instead as

http://my.server.com/genome/index.html
http://my.server.com/cgi-bin/genome/hgGateway

Has anyone tried? I've tried using mod_proxy_html with Apache, but it
was kind of a nightmare trying to rewrite every internal URL, and
impossible to fix the links within javascript and mapped images.

David Hoover
CIT/NIH

Jonathan Casper

unread,
Sep 28, 2015, 5:45:21 PM9/28/15
to David Hoover, genome...@soe.ucsc.edu

Hello David,

Thank you for your questions about running a Genome Browser mirror from within a subdirectory of your webserver. This is something that we want to make possible, and we have been working recently to solve some of the problems that prevent it from working. Unfortunately, as you have discovered there are still outstanding issues. We are making progress, but if you have examples of links that are broken, we would be very grateful for a list. There may still be more problems that we are unaware of.

Thank you as well for the suggested patch to hgLogin from your related question (https://groups.google.com/a/soe.ucsc.edu/d/topic/genome-mirror/og-lE3cgrBk/discussion), but we make significant use of the "returnto" cart parameter at UCSC and disabling it isn't really an option for us. The "returnto" parameter is designed to allow your main server to be on a different machine from your login server. When working correctly, it should actually help to solve the kind of URL problem that you describe instead of making it worse. We are looking into what is going wrong with the way the "returnto" parameter is set and how we can fix it to work in a subdirectory environment. You are right that the system is using the SERVER_NAME environment variable, but the place where it makes that decision is buried deep within the codebase and the effects of changing it will take some time to trace.

Thanks again for pointing this out, and best of luck with your experiments!

One final note: In your example URLs, you suggest using http://my.server.com/genome/index.html and http://my.server.com/cgi-bin/genome/hgGateway. The Genome Browser codebase includes many dependencies that expect to find the cgi-bin/ directory at the root level of the Browser. We would like to change that, but our goal for the moment is only to modify the browser to allow you to use the URLs http://my.server.com/genome/index.html and http://my.server.com/genome/cgi-bin/hgGateway. Allowing you to place your mirror's cgi-bin directory in an arbitrary location with respect to the root Browser page will be a much larger project.

I hope this is helpful. If you have any further questions, please reply to gen...@soe.ucsc.edu or genome...@soe.ucsc.edu. Questions sent to those addresses will be archived in publicly-accessible forums for the benefit of other users. If your question contains sensitive data, you may send it instead to genom...@soe.ucsc.edu.

--
Jonathan Casper
UCSC Genome Bioinformatics Group




David Hoover
CIT/NIH

--


David Hoover

unread,
Oct 7, 2015, 1:46:47 PM10/7/15
to Jonathan Casper, genome...@soe.ucsc.edu
The best solution was to create a single directory
[DocumentRoot]/genome, and put all the cgi executables in
[DocumentRoot]/genome/cgi-bin. This solved almost everything.

How difficult would it be for UCSC to change the description.html files
in gbdb to have "../images" instead of "/images"? I can patch the
htdocs files from the version updates, but we rsync gbdb every week and
it is kind of a pain to continuously search and patch the files in gbdb.

For example /gbdb/hg19/html/description.html:

$ diff description.html.ORIG description.html
6c6
< <IMG SRC="../images/human.jpg" WIDTH=275 HEIGHT=275 ALT="human"></A>
---
> <IMG SRC="/images/human.jpg" WIDTH=275 HEIGHT=275 ALT="human"></A>

Changing the absolute links "/images" to relative links "../images"
would help enormously.

David Hoover
HPC @ NIH
> to gen...@soe.ucsc.edu <mailto:gen...@soe.ucsc.edu> or
> genome...@soe.ucsc.edu <mailto:genome...@soe.ucsc.edu>.
> Questions sent to those addresses will be archived in
> publicly-accessible forums for the benefit of other users. If your
> question contains sensitive data, you may send it instead to
> genom...@soe.ucsc.edu <mailto:genom...@soe.ucsc.edu>.
>
> --
> Jonathan Casper
> UCSC Genome Bioinformatics Group
>
>
> On Sun, Sep 27, 2015 at 6:40 AM, David Hoover <hoov...@helix.nih.gov
> <mailto:hoov...@helix.nih.gov>> wrote:
>
> Would it be possible to install a mirror of the UCSC Genome Browser
> as a subdirectory of a webserver, rather than as the main host?
> That is, instead of serving the browser as (for example)
>
> http://my.server.com/index.html
> http://my.server.com/cgi-bin/hgGateway
>
> but instead as
>
> http://my.server.com/genome/index.html
> http://my.server.com/cgi-bin/genome/hgGateway
>
> Has anyone tried? I've tried using mod_proxy_html with Apache, but
> it was kind of a nightmare trying to rewrite every internal URL, and
> impossible to fix the links within javascript and mapped images.
>
> David Hoover
> CIT/NIH
>
> --
>
>
> --
>
> To unsubscribe from this group and stop receiving emails from it, send
> an email to genome-mirro...@soe.ucsc.edu
> <mailto:genome-mirro...@soe.ucsc.edu>.

Matthew Speir

unread,
Oct 9, 2015, 6:03:31 PM10/9/15
to David Hoover, Jonathan Casper, genome...@soe.ucsc.edu
Hi David,

We have now made the links to these images into relative links, rather
than absolute ones. The /gbdb/ files on our downloads server should be
updated this Sunday with the new files. Thank you for the suggestion!

I hope this is helpful. If you have any further questions, please reply
to genome...@soe.ucsc.edu. All messages sent to that address are
archived on a publicly-accessible Google Groups forum. If your question
includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

Matthew Speir
UCSC Genome Bioinformatics Group
Reply all
Reply to author
Forward
0 new messages