Question: Galaxy and Nginx Config
0
gravatar for NobleGestures
2.7 years ago by
Southern Arkansas
NobleGestures10 wrote:

My galaxy and NGINX are running strong. How do you merge these together? How do you add nginx to galaxy?

galaxy nginx • 1.2k views
ADD COMMENTlink modified 2.7 years ago by Dannon Baker3.7k • written 2.7 years ago by NobleGestures10
2
gravatar for Dannon Baker
2.7 years ago by
Dannon Baker3.7k
United States
Dannon Baker3.7k wrote:

We have a wiki page about setting it all up here: https://wiki.galaxyproject.org/Admin/Config/nginxProxy

Please ask if you have any questions. We use nginx for usegalaxy.org and it works great.

ADD COMMENTlink written 2.7 years ago by Dannon Baker3.7k

Dan, I do appreciate your concern..

I must have read through that tutorial 100+ times.lol. I appreciate the good documentation but when it comes to merging the two together(NGINX & Galaxy), Its not specific at all.

The documentation never states how to "simply" add nginx to galaxy, nor does it guide you to verify the working environment. Any suggestions?

ADD REPLYlink written 2.7 years ago by NobleGestures10
1

I'm not sure what you're asking. Can you be more specific which step you're having trouble with?

ADD REPLYlink written 2.7 years ago by Dannon Baker3.7k

There are two important files, galaxy.ini and nginx.conf. At the moment, I simply want to configure Basic proxy request/serve static content using nginx. My galaxy.ini and nginx is configured properly and is running. When i run the command "curl -I 127.0.0.1" I get this..

HTTP/1.1 302 Found Server: nginx/1.9.12 Date: Mon, 21 Mar 2016 21:43:52 GMT Content-Type: text/html Connection: keep-alive x-frame-options: SAMEORIGIN Set-Cookie: galaxysession=ID#

Is that good?

My question is... Do I need to add any nginx parameters to the galaxy.ini file to let my galaxy server know to use nginx? Or does my nginx.conf simply use uptream galaxy_app {server localhost:8080 }??

ADD REPLYlink written 2.7 years ago by NobleGestures10

As documented in your galaxy.ini, there are various advanced options that can be enabled to support extra nginx features, but it isn't a requirement to use any of these for the most basic configuration.

Once you've set up nginx with an upstream galaxy server and the routes as detailed in that wiki page I linked before, you should be good to go.

An easy way to test this is just to hit the nginx server location with a browser. I assume Galaxy is running on port 8080 (or some other port), and nginx is running on 80. When you navigate to 127.0.0.1 in your browser, what happens?

ADD REPLYlink written 2.7 years ago by Dannon Baker3.7k

True about the extra features. Ok I will look into that...to get a better understanding of the routes handling.

Currently my galaxy browser shows/run using this address: http://hpcNode01:8081/

How do you use this link? http://galaxy_app


This is working thus far:

    ####Galaxy Configurations
            upstream galaxy_app {
                    # for TCP setups, point these to your backend servers
                    server hpcNode01:8081;
            }
            proxy_next_upstream off;

            server {
                    client_max_body_size 10G;
                    location / {
                            proxy_pass              **http://galaxy_app;**
                            proxy_set_header        X-Forwarded-Host $host;
                            proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                    }
                    location ~ ^/plugins/visualizations/(?<vis_name>.+?)/static/(?<static_file>.*?)$ {
                            alias /sge/galaxy_dist/config/plugins/visualizations/$vis_name/static/$static_file;
                    }
            }

}

ADD REPLYlink modified 2.7 years ago • written 2.7 years ago by NobleGestures10
0
gravatar for thomas.draebing
2.7 years ago by
Germany
thomas.draebing20 wrote:

I actually switched to Apache, which works fine. Haven't tried to get nginx running since. Sorry.

ADD COMMENTlink written 2.7 years ago by thomas.draebing20
1

I was able to get it working if you need assistance.

ADD REPLYlink written 2.7 years ago by NobleGestures10

Ok thanks for the help anyway

ADD REPLYlink written 2.7 years ago by NobleGestures10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 171 users visited in the last hour