Hi all, TL:DR abstract: Forgetting the "filter-with = proxy-prefix" gives very confusing results. Hopefully this email will help someone else who made the same configuration mistake. -- As part of trying out the new (still in beta) Galaxy via git on GitHub (rather than via hg on BitBucket), I am attempting to recreate my development instance under http://localhost/galaxy-dev via port 8081 using an Apache Proxy: https://wiki.galaxyproject.org/Admin/Config/ApacheProxy Various things have changed, so rather than universe_wsgi.ini we now use config/galaxy.ini and I wanted to try that here, and so began by manually copying over settings I had changed. Key settings include the prefix and cookie_path, here is what I initially changed from the current defaults: $ diff config/galaxy.ini config/galaxy.ini.sample 32d31 < port = 8081 64,65c63 < #prefix = /galaxy < prefix = /galaxy-dev ---
prefix = /galaxy 93d90 < cookie_path = /galaxy-dev 678d674 < library_import_dir = True 693d688 < allow_library_path_paste = True 773d767 < admin_users = p.j.a.cock@googlemail.com 787d780 < allow_user_impersonation = True 793d785 < allow_user_dataset_purge = True 896,897d887 < expose_dataset_path = True <
Here's my Apache configuration file, $ more /etc/httpd/conf.d/galaxy-dev.conf # mod_rewrite <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^/galaxy-dev$ /galaxy-dev/ [R] RewriteRule ^/galaxy-dev/static/style/(.*) /mnt/galaxy/repositories/galaxy/static/june_2007_style/blue/$1 [L] RewriteRule ^/galaxy-dev/static/scripts/(.*) /mnt/galaxy/repositories/galaxy/static/scripts/packed/$1 [L] RewriteRule ^/galaxy-dev/static/(.*) /mnt/galaxy/repositories/galaxy/static/$1 [L] RewriteRule ^/galaxy-dev/favicon.ico /mnt/galaxy/repositories/galaxy/static/favicon.ico [L] RewriteRule ^/galaxy-dev/robots.txt /mnt/galaxy/repositories/galaxy/static/robots.txt [L] RewriteRule ^/galaxy-dev/(.*) http://localhost:8081/$1 [P] </IfModule> The Apache settings look fine, e.g. this URL works for the welcome page: http://localhost/galaxy-dev/static/welcome.html I've confirmed this by editing the default welcome page at /mnt/galaxy/repositories/galaxy/static/welcome.html The observed problem is that http://localhost/galaxy-dev/ gives: <quote> None Tools History Not Found The requested URL /root/welcome was not found on this server. ________________________________ Apache/2.2.15 (CentOS) Server at xxxxxx Port 80 </quote>
From the page source, the wrong URLs are being used, e.g.:
<link href="/static/style/base.css?v=1424865275" media="screen" rel="stylesheet" type="text/css" /> <script src="/static/scripts/libs/jquery/jquery.js?v=1424865275" type="text/javascript"></script> and: <div style="position: absolute; width: 100%; height: 100%"> <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="/root/welcome"></iframe> </div> For some reason the prefix specified was not being used for all the static resources (they should be "/galaxy-dev/static/..." instead of just "/static/...") and the iframe used "/root/welcome" rather then what I expected, "/galaxy-dev/static/welcome". I eventually realised on re-reading the wiki page that I was missing the crucial setting "filter-with = proxy-prefix" which fixed this: https://wiki.galaxyproject.org/Admin/Config/ApacheProxy I'm mainly sending this email in the hope it might show up in future Google searches and help someone else debugging the same mistake one day. Would it be helpful for Galaxy to notice if the configuration file contained a [filter:proxy-prefix] section without actually enabling it with "filter-with = proxy-prefix"? Regards, Peter