Hello,

I've been trying to get working a local galaxy installation, using nginx with the upload module as a proxy.

It all seems to work, except uploading files to Galaxy, where I get a "GET /_upload/ HTTP/1.1" 404 and nothing else Ic an find in the logs.

There must be some misconfiguration somewhere, but I can't sport it. Could you help me?

Here's my nginx.conf:

user galaxy;
worker_processes 10;
pid /run/nginx.pid;

events {
       worker_connections 768;
}
http {
   gzip  on;
   gzip_http_version 1.1;
   gzip_vary on;
   gzip_comp_level 4;
   gzip_proxied any;
   gzip_types text/plain text/css application/x-javascript text/xml application/xml text/javascript application/json;
   gzip_buffers 16 8k;
   gzip_disable "MSIE [1-6].(?!.*SV1)";
   upstream galaxy_app {
       server localhost:8080;
   }
   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 /_x_accel_redirect/ {
           internal;
           alias /;
       }
       location ~ ^/plugins/visualizations/(?<vis_name>.+?)/static/(?<static_file>.*?)$ {
           alias /home/galaxy/galaxy/config/plugins/visualizations/$vis_name/static/$static_file;
           expires 24h;
       }
       location /static {
           alias /home/galaxy/galaxy/static;
           expires 24h;
       }
       location /static/style {
           alias /home/galaxy/galaxy/static/june_2007_style/blue;
           expires 24h;
       }
       location /static/scripts {
           alias /home/galaxy/galaxy/static/scripts/packed;
           expires 24h;
       }
       location /favicon.ico {
           alias /home/galaxy/galaxy/static/favicon.ico;
           expires 24h;
       }
       location /robots.txt {
           alias /home/galaxy/galaxy/static/robots.txt;
           expires 24h;
       }
       location /_upload {
           upload_store /home/galaxy/galaxy/database/tmp/upload_store;
           upload_pass_form_field "";
           upload_set_form_field "__${upload_field_name}__is_composite" "true";
           upload_set_form_field "__${upload_field_name}__keys" "name path";
           upload_set_form_field "${upload_field_name}_name" "$upload_file_name";
           upload_set_form_field "${upload_field_name}_path" "$upload_tmp_path";
           upload_pass_args on;
           upload_pass /_upload_done;
       }
       location /_upload_done {
           set $dst /api/tools;
           if ($args ~ nginx_redir=([^&]+)) {
               set $dst $1;
           }
           rewrite "" $dst;
       }
       location /plugins {
           alias /home/galaxy/galaxy-dist/config/plugins;
       }
   }
}


And here's my galaxy.ini:

[server:handler0]
port = 8090
host = 127.0.0.1
use_threadpool = true
threadpool_workers = 10
 
[server:handler1]
port = 8091
host = 127.0.0.1
use_threadpool = true
threadpool_workers = 10
 
[server:handler2]
port = 8092
host = 127.0.0.1
use_threadpool = true
threadpool_workers = 10
 
[server:handler3]
port = 8093
host = 127.0.0.1
use_threadpool = true
threadpool_workers = 10
 
[server:main]
port = 8080
host = 0.0.0.0
use_threadpool = True
threadpool_workers = 30
threadpool_kill_thread_limit = 10800
 
[filter:gzip]
 
[filter:proxy-prefix]
prefix = /galaxy
 
[app:main]
paste.app_factory = galaxy.web.buildapp:app_factory
database_connection = postgresql://galaxy:not_the_actual_password@localhost/galaxy?host=/var/run/postgresql
nginx_x_accel_redirect_base = /_x_accel_redirect
nginx_upload_store = database/tmp/upload_store
nginx_upload_path = /_upload
tool_dependency_dir = dep_dir
use_nglims = False
nglims_config_file = tool-data/nglims.yaml
static_enabled = True
debug = False
use_interactive = False
id_secret = ValarDohaerys
admin_users = adria.cereto@ctns.cat, galactus@galaxy.gal
allow_user_impersonation = True
allow_user_dataset_purge = True
new_user_dataset_access_role_default_private = True
expose_user_name = True
master_api_key = heavysplatling
track_jobs_in_database = True
enable_job_recovery = True
 
[galaxy_amqp]
 
[uwsgi]
processes = 44
stats = 127.0.0.1:9191
socket = 127.0.0.1:4001
pythonpath = lib
threads = 12
logto = /home/galaxy/uwsgi.log
master = True


Thank you in advance,

Adrià

--
Adrià Cereto i Massagué
Centre for Omic Sciences (COS) 
Servei de Recursos Científics i Tècnics (SRCiT)
Universitat Rovira i Virgili 
Av. Universitat, 1. 
43204 Reus (Catalonia) 
Extensió URV: 4838

Languages: Català, Español, English, Français, Deutsch, Português

Important Notice