running browser in subdirectory not working with hgLogin

9 views
Skip to first unread message

David Hoover

unread,
Sep 28, 2015, 12:31:32 PM9/28/15
to genome...@soe.ucsc.edu
I've managed to get the browser running under a subdirectory, rather
than as a virtual host. However, I had to hack hgLogin to get the links
created to honor the subdirectory. Here is my patch to hgLogin:

--- hgLogin.c.ORIG 2015-09-27 14:59:32.565033000 -0400
+++ hgLogin.c 2015-09-27 15:01:01.590309000 -0400
@@ -331,12 +331,12 @@
char *returnURL = cartUsualString(cart, "returnto", "");
char *hgLoginHost = wikiLinkHost();
char returnTo[2048];
-if (!returnURL || sameString(returnURL,""))
+//if (!returnURL || sameString(returnURL,""))
safef(returnTo, sizeof(returnTo),
"http%s://%s/cgi-bin/hgSession?hgS_doMainPage=1",
cgiAppendSForHttps(), hgLoginHost);
-else
- safecpy(returnTo, sizeof(returnTo), returnURL);
+//else
+// safecpy(returnTo, sizeof(returnTo), returnURL);
return cloneString(returnTo);
}


I think this is because hgLogin is getting the URL directly from the
server via the SERVER_NAME environment variable, rather than from the
wiki.host configuration variable in hg.conf.

Any comments?

David Hoover
CIT/NIH

Jonathan Casper

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

Hello David,

Thank you for this report of a problem using the hgLogin CGI from a subdirectory and for your suggested patch to hgLogin.c. I have responded to this question as part of a response to your previous query at: https://groups.google.com/a/soe.ucsc.edu/d/topic/genome-mirror/_eiIX_J_cqs/discussion.

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

--


Reply all
Reply to author
Forward
0 new messages