Proxing Galaxy 19.01 with Apache

Hi,

I am trying to set up Galaxy proxying (on our 19.01 instance) with Apache.

According to https://docs.galaxyproject.org/en/latest/admin/apache.html, I set up configuration as is :

  • in httpd.conf :
    ProxyPass /galaxydev unix:///tmp/galaxy_dev.sock|uwsgi://

RewriteEngine On
RewriteRule ^/galaxydev/$ /galaxydev [R,L]
RewriteRule ^/galaxydev/static/style/(.) /home/galaxydev/galaxy/static/june_2007_style/blue/$1 [L]
RewriteRule ^/galaxydev/static/(.
) /home/galaxydev/galaxy/static/$1 [L]
RewriteRule ^/galaxydev/favicon.ico /home/galaxydev/galaxy/static/favicon.ico [L]
RewriteRule ^/galaxydev/robots.txt /home/galaxydev/galaxy/static/robots.txt [L]

  • in galaxy.yml :
    uwsgi :
    socket: /tmp/galaxy_dev.sock ###syntax unix:///tmp/galaxy_dev.sock is not recognized ???
    mount: /galaxydev=galaxy.webapps.galaxy.buildapp:uwsgi_app()
    manage-script-name: true

galaxy :
cookie_path: /galaxydev

Accessing “galaxy_host”/galaxydev with a browser fails. Apache error_log returns this error :
[Tue Apr 09 11:35:57.850743 2019] [:error] [pid 19307:tid 47544504309504] [client 195.221.174.148:63192] AH10097: error parsing URL //: Invalid host/port
[Tue Apr 09 11:36:06.537558 2019] [:error] [pid 19211:tid 47544525321984] [client 195.221.174.148:63195] AH10097: error parsing URL //: Invalid host/port
[Tue Apr 09 12:44:13.854039 2019] [:error] [pid 19307:tid 47544514815744] [client 195.221.174.148:63669] AH10097: error parsing URL //: Invalid host/port
[Tue Apr 09 12:44:14.718221 2019] [:error] [pid 19307:tid 47544519018240] [client 195.221.174.148:63670] AH10097: error parsing URL //: Invalid host/port
[Tue Apr 09 12:44:14.953882 2019] [:error] [pid 19307:tid 47544523220736] [client 195.221.174.148:63671] AH10097: error parsing URL //: Invalid host/port
[Tue Apr 09 12:46:12.715991 2019] [:error] [pid 19307:tid 47544529524480] [client 195.221.174.148:63704] AH10097: error parsing URL //: Invalid host/port
[Tue Apr 09 16:52:12.155767 2019] [:error] [pid 19307:tid 47544542131968] [client 195.221.174.167:59696] AH10097: error parsing URL //: Invalid host/port

I am stuck with the “URL //: Invalid host/port” error message.
Would you have any hint ?

Regards.

1 Like

This seems to be related to an apache mod_proxy_uwsgi bug.

For those stuck in same situation, I used this workaround :

  1. configure uwsgi proxying on a TCP socket (ie uWSGI on a TCP socket)
  2. check apache2/mod_proxy_uwsgi.c and apply following fix if needed : https://github.com/unbit/uwsgi/commit/6ce856c9fdb98833f9142f84c92b75f546b32dc2#diff-85cd090aa23e09feb1f28c92ae5aded6
1 Like

Hi @bertrand!!
Thanks for posting the solution.

For reference, this is the bug referenced above: mod_proxy_uwsgi port parsing · Issue #1491 · unbit/uwsgi · GitHub

Linked follow-up posts: