Jeff,

Did you ever get this to work?

-Adam

--
Adam Brenner
Computer Science, Undergraduate Student
Donald Bren School of Information and Computer Sciences

Research Computing Support
Office of Information Technology
http://www.oit.uci.edu/rcs/

University of California, Irvine
www.ics.uci.edu/~aebrenne/
aebrenne@uci.edu


On Wed, May 1, 2013 at 1:52 PM, Jeffrey Long <jlong1@ualberta.ca> wrote:
In the Apache access.log, a single access link results in a great many output lines; the first two look like this:

128.233.109.35 - - [01/May/2013:14:31:29 -0600] "GET /galaxy HTTP/1.1" 200 5058 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.29.13 (KHTML, like Gecko) Version/6.0.4 Safari/536.29.13"
128.233.109.35 - - [01/May/2013:14:31:29 -0600] "GET /galaxy/static/style/base.css?v=1367440234 HTTP/1.1" 404 495 "http://trove.usask.ca/galaxy" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.29.13 (KHTML, like Gecko) Version/6.0.4 Safari/536.29.13"

If I'm reading this right, the second one involves a 404 error.  Indeed, I don't see any static/style directory in my galaxy location...should there be one?

I don't get anything new in apache's error.log as a result of a single access attempt.

-Jeff



On Wed, May 1, 2013 at 6:16 AM, Nate Coraor <nate@bx.psu.edu> wrote:
On Apr 30, 2013, at 5:15 PM, Jeffrey Long wrote:

> 1) Any idea which proxy settings in the universe_wsgi file need to be set other than the ones on the website?  Those are the only ones I changed.  I scrolled down to the 'Advanced Proxy' settings but didn't see anything that looked relevant to me.
>
> Probably I should have sent this earlier, but this is the traceback I get; it looks like there's a url somewhere that's not getting passed along or re-assembled properly.
>
> Exception happened during processing of request from ('127.0.0.1', 47424)
> Traceback (most recent call last):
>   File "/mnt2/birl/MAVEN/bin/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/httpserver.py", line 1053, in process_request_in_thread
>     self.finish_request(request, client_address)
>   File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
>     self.RequestHandlerClass(request, client_address, self)
>   File "/usr/lib/python2.7/SocketServer.py", line 638, in __init__
>     self.handle()
>   File "/mnt2/birl/MAVEN/bin/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/httpserver.py", line 432, in handle
>     BaseHTTPRequestHandler.handle(self)
>   File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
>     self.handle_one_request()
>   File "/mnt2/birl/MAVEN/bin/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/httpserver.py", line 427, in handle_one_request
>     self.wsgi_execute()
>   File "/mnt2/birl/MAVEN/bin/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/httpserver.py", line 287, in wsgi_execute
>     self.wsgi_start_response)
>   File "/mnt2/birl/MAVEN/bin/galaxy-dist/eggs/PasteDeploy-1.3.3-py2.7.egg/paste/deploy/config.py", line 285, in __call__
>     return self.app(environ, start_response)
>   File "/mnt2/birl/MAVEN/bin/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/urlmap.py", line 193, in __call__
>     path_info = self.normalize_url(path_info, False)[1]
>   File "/mnt2/birl/MAVEN/bin/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/urlmap.py", line 117, in normalize_url
>     or self.domain_url_re.search(url)), "URL fragments must start with / or http:// (you gave %r)" % url
> AssertionError: URL fragments must start with / or http:// (you gave '.')

Hi Jeff,

Does the Apache log give any indication of what path is being accessed?  You may also want to enable mod_rewrite's debug logging to make sure it's behaving correctly.

> 2) Are the static subdirectories strictly necessary, or can I worry about one problem at a time?  I've tried both commenting out the proxy lines (in apache2.conf) and leaving them in, and I get the same behaviour.

You can exclude the static page rewrites for the purposes of getting it working.  Galaxy's internal HTTP server will serve the static pages itself.

--nate

>
> Thanks, I'll try to remember to 'reply-all' here!
>
> -Jeff
>
>
> On Mon, Apr 29, 2013 at 1:23 PM, Adam Brenner <aebrenne@uci.edu> wrote:
> Hia Jeff,
>
> I think this is related to the proxy settings in Galaxy (universe_wsgi.ini)
>
> What is happening is that if you look at the source code for your
> galaxy website, it is trying to load css/images from:
> http://trove.usask.ca/galaxy/static/style/base.css?v=1367254127 But if
> you visit that link it offers you a 404 not found. Make sure the proxy
> settings in your universe_wsgi.ini is set correctly.
>
> If it is, it could be that you need to setup proxies for the
> subdirectories as well. If you look at the nginx guide here:
> http://wiki.galaxyproject.org/Admin/Config/Performance/nginx%20Proxy
> you will notice that we provide alias for /static/*.
>
> In terms of doing this in Apache, you may need to add more proxy pass
> lines that correspond to the subdirectories in question.
>
>
> Be sure to post back to the Galaxy listsrv so that future people may
> benefit from this!
> -Adam
>
> --
> Adam Brenner
> Computer Science, Undergraduate Student
> Donald Bren School of Information and Computer Sciences
>
> Research Computing Support
> Office of Information Technology
> http://www.oit.uci.edu/rcs/
>
> University of California, Irvine
> www.ics.uci.edu/~aebrenne/
> aebrenne@uci.edu
>
>
> On Mon, Apr 29, 2013 at 9:51 AM, Jeffrey Long <jlong1@ualberta.ca> wrote:
> > Hi Adam thanks for the response,
> > I'm not using VirtualHosts.  I just copied the lines shown into
> > /etc/apache2/apache.conf (this is on Ubuntu Linux).
> >
> > I copied the lines you list (with appropriate modification) into this same
> > apache.conf.  That seems to work - as far as Apache goes!  However, when I
> > load galaxy in a browser now, I get a bunch of gobbledigook (it looks like
> > the frames aren't being built properly or something).  You can take a look;
> > I've temporarily enabled the site to be world-viewable.
> >
> > http://trove.usask.ca/galaxy
> >
> > Thanks for your help!
> >
> > -Jeff
> >
> >
> > On Fri, Apr 26, 2013 at 10:11 PM, Adam Brenner <aebrenne@uci.edu> wrote:
> >>
> >> Jeff,
> >>
> >> How / Where did you add the apache changes? Are you using VirutalHosts
> >> or ... ? Quick glance, everything appears correct. Its been a while
> >> since I used Apache (switched everything to nginx) however I believe
> >> if you want to setup a Reverse Proxy, you need to add / use the proxy
> >> pass lines which does not appear in the Galaxy Wiki.
> >>
> >> Something like this should work: (untested...)
> >>
> >> <IfModule mod_proxy.c>
> >>   ProxyRequests Off
> >>   <Proxy *>
> >>     AddDefaultCharset off
> >>     Order Deny,Allow
> >>     Deny from all
> >>     Allow from *.ualberta.ca # Change / Remove as needed
> >>   </Proxy>
> >>
> >>   ProxyPass /galaxy http://localhost:8080/
> >>   ProxyPassReverse /galaxy http://localhost:8080/
> >>   # Line below is optional
> >>   Redirect permanent /galaxy http://mymachine.com/galaxy
> >>
> >>   ProxyVia On
> >> </IfModule>
> >>
> >>
> >> Let us know,
> >> -Adam
> >>
> >> --
> >> Adam Brenner
> >> Computer Science, Undergraduate Student
> >> Donald Bren School of Information and Computer Sciences
> >>
> >> Research Computing Support
> >> Office of Information Technology
> >> http://www.oit.uci.edu/rcs/
> >>
> >> University of California, Irvine
> >> www.ics.uci.edu/~aebrenne/
> >> aebrenne@uci.edu
> >>
> >>
> >> On Fri, Apr 26, 2013 at 2:56 PM, Jeffrey Long <jlong1@ualberta.ca> wrote:
> >> > Hi folks,
> >> > I am wanting to run a galaxy instance and serve it at a location other
> >> > than
> >> > the webserver root, i.e. at  http://mymachine.com/galaxy rather than
> >> > just at
> >> > http://mymachine.
> >> >
> >> > To do this, I've followed the instructions about proxying Galaxy through
> >> > Apache at http://wiki.galaxyproject.org/Admin/Config/Apache%20Proxy.
> >> > I'm
> >> > pretty sure I've followed the instructions exactly.  I enabled the
> >> > necessary
> >> > apache proxy modules and then I added these lines to my apache.conf
> >> > file:
> >> >
> >> >
> >> > RewriteEngine on RewriteRule ^/galaxy$ /galaxy/ [R] RewriteRule
> >> > ^/galaxy/static/style/(.*)
> >> > /myplace/galaxy-dist/static/june_2007_style/blue/$1 [L] RewriteRule
> >> > ^/galaxy/static/scripts/(.*)
> >> > /myplace/galaxy-dist/static/scripts/packed/$1
> >> > [L] RewriteRule ^/galaxy/static/(.*) /myplace/galaxy-dist/static/$1 [L]
> >> > RewriteRule ^/galaxy/favicon.ico /myplace/galaxy-dist/static/favicon.ico
> >> > [L]
> >> > RewriteRule ^/galaxy/robots.txt /myplace/galaxy-dist/static/robots.txt
> >> > [L]
> >> > RewriteRule ^/galaxy(.*) http://localhost:8080$1 [P]
> >> >
> >> > ...and re-started the apache server without a problem (note: I also
> >> > tried it
> >> > commenting out everything but the first, second and last line in case
> >> > there
> >> > was an issue with the static stuff).
> >> >
> >> > I then made sure the following lines were present and uncommented in my
> >> > universe_wsgi.ini file
> >> >
> >> > [filter:proxy-prefix]
> >> > use = egg:PasteDeploy#prefix
> >> > prefix = /galaxy
> >> >
> >> > [app:main]
> >> >
> >> > filter-with = proxy-prefix
> >> > cookie_path = /galaxy
> >> >
> >> >
> >> > I start up Galaxy.  And still, I can only reach it on
> >> > http://mymachine:8080,
> >> > not at http://mymachine/galaxy as I intend.
> >> >
> >> > Any help would be appreciated!  Thanks!
> >> >
> >> > -Jeff
> >> >
> >> >
> >> > ___________________________________________________________
> >> > Please keep all replies on the list by using "reply all"
> >> > in your mail client.  To manage your subscriptions to this
> >> > and other Galaxy lists, please use the interface at:
> >> >   http://lists.bx.psu.edu/
> >> >
> >> > To search Galaxy mailing lists use the unified search at:
> >> >   http://galaxyproject.org/search/mailinglists/
> >>
> >
>
>
> ___________________________________________________________
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
>  http://lists.bx.psu.edu/
>
> To search Galaxy mailing lists use the unified search at:
>  http://galaxyproject.org/search/mailinglists/