Hi John,

thanks for your answer. The nginx config can be found at 
https://gist.github.com/jenzopr/623c3541419ce33f662c
What I did was the following:
1) Stopping both servers, nginx and galaxy
2) Removing all log files and the tmp files in upload_store
3) Restarting the servers
4) Starting a fresh browser session, deleting all cookies.
5) Navigating to my galaxy via the browser (172.16.12.122/galaxy, not 
172.16.12.122:8080)
6) Login and upload a file test.txt

The file appears in the upload_store, but this time I got a 403 although I was 
logged in properly.
Best,
Jens

-----Original Message-----
From: John Chilton [mailto:jmchil...@gmail.com] 
Sent: Mittwoch, 2. März 2016 21:30
To: Preussner, Jens
Cc: galaxy-dev@lists.galaxyproject.org
Subject: Re: [galaxy-dev] nginx data upload request never reaches /api/tools

Can you share your nginx config? Perhaps with a gist or something.

-John

On Mon, Feb 29, 2016 at 12:35 PM, Preussner, Jens 
<jens.preuss...@mpi-bn.mpg.de> wrote:
> Hi all,
>
>
>
> I set up the data upload using nginx as described in the wiki 
> (https://wiki.galaxyproject.org/Admin/Config/nginxProxy, using the 
> subdirectory /galaxy).
>
> The uploaded file also appears inside the uploade_store folder on the 
> galaxy server, but galaxy does not add the file.
>
> Investigating the log files, I found the corresponding lines in the
> nginx.error.log:
>
>
>
> # Post request is received
>
> 2016/02/29 12:55:37 [notice] 13156#0: *4 "^(GET|HEAD|POST)$" matches 
> "POST",
> client: 172.16.17.17, server: , request: "POST /_upload HTTP/1.1", host:
> "172.16.12.122", referrer: http://172.16.12.122/galaxy/
>
> # Upload starts
>
> 2016/02/29 12:55:37 [info] 13156#0: *4 started uploading file 
> "boxes.txt" to "/mnt/idrive1/database/tmp/upload_store/0020132707" 
> (field "files_0|file_data", content type "text/plain"), client: 
> 172.16.17.17,
> server: , request: "POST /_upload HTTP/1.1", host: "172.16.12.122",
> referrer: http://172.16.12.122/galaxy/
>
> # Upload done, the file is present in the given path
>
> 2016/02/29 12:55:37 [info] 13156#0: *4 finished uploading file "boxes.txt"
> to "/mnt/idrive1/database/tmp/upload_store/0020132707", client:
> 172.16.17.17, server: , request: "POST /_upload HTTP/1.1", host:
> "172.16.12.122", referrer: "http://172.16.12.122/galaxy/";
>
> # Redirection starts?
>
> 2016/02/29 12:55:37 [notice] 13156#0: *4 "^(GET|HEAD|POST)$" matches 
> "POST",
> client: 172.16.17.17, server: , request: "POST /_upload HTTP/1.1", host:
> "172.16.12.122", referrer: "http://172.16.12.122/galaxy/";
>
> 2016/02/29 12:55:37 [notice] 13156#0: *4 "nginx_redir=([^&]+)" does 
> not match "", client: 172.16.17.17, server: , request: "POST /_upload 
> HTTP/1.1",
> host: "172.16.12.122", referrer: "http://172.16.12.122/galaxy/";
>
> 2016/02/29 12:55:37 [notice] 13156#0: *4 "" matches "/_upload_done", client:
> 172.16.17.17, server: , request: "POST /_upload HTTP/1.1", host:
> "172.16.12.122", referrer: "http://172.16.12.122/galaxy/";
>
> # Redirection should be done here
>
> 2016/02/29 12:55:37 [notice] 13156#0: *4 rewritten data:
> "/galaxy/api/tools", args: "", client: 172.16.17.17, server: , request:
> "POST /_upload HTTP/1.1", host: "172.16.12.122", referrer:
> "http://172.16.12.122/galaxy/";
>
> # ModSecurity seems to block the redirect?
>
> 2016/02/29 12:55:37 [info] 13156#0: *4 ModSecurity: invalid "Content-Length"
> header, client: 172.16.17.17, server: , request: "POST /_upload 
> HTTP/1.1",
> host: "172.16.12.122", referrer: "http://172.16.12.122/galaxy/";
>
> 2016/02/29 12:55:37 [notice] 13156#0: *4 "^(GET|HEAD|POST)$" matches 
> "GET",
> client: 172.16.17.17, server: , request: "POST /_upload HTTP/1.1", host:
> "172.16.12.122", referrer: "http://172.16.12.122/galaxy/";
>
>
>
> A ModSecurityEnabled off; within the /_upload and /_upload_done of the 
> nginx config did not help.
>
> Any idea why the Content-Length header causes problems and is blocked 
> by modSec? Any workaround for ModSec to accept everything that goes 
> from internal to internal?
>
>
>
> Thanks for your help!
>
>
>
> Best,
>
> Jens
>
>
>
>
> ___________________________________________________________
> 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:
>   https://lists.galaxyproject.org/
>
> 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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to