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
--