Hi all,
I'm calling for people who have got the nginx file upload module to work in their seaside apps... We are trying to use the Nginx file upload module but are stuck when the request needs to get passed on to seaside. We are using a configuration with a separate '/upload' location that gets handled by the file upload module. The request then needs to get passed to the upstream backend (seaside) but that request still has the URI '/upload' and we do not seem to get it rewritten to the '/seasideapp' URI. Is there anyone who has this working completely and could give us some advice on how solve this? The relevant parts of our nginx conf look like this: We also tried with a named location, but according to the docs, that makes the request arguments be dropped (and we need the _s & _k args for seaside...) Johan ---- location / { include fastcgi_params; fastcgi_pass seaside; } # Upload form should be submitted to this location location /upload { # Pass altered request body to this location upload_pass /backend; upload_pass_args on; #Pass all fields of the form upload_pass_form_field ".*"; # Store files to this directory upload_store /var/www/documents/; # Set specified fields in request body upload_set_form_field $upload_field_name.name "$upload_file_name"; upload_set_form_field $upload_field_name.content_type "$upload_content_type"; upload_set_form_field $upload_field_name.path "$upload_tmp_path"; upload_cleanup 400 404 499 500-505; } location /backend { rewrite ^/upload/(.*) /seasideapp/$1 last; } |
We hebben het een aardig eind werkend. Nick heeft geholpen. Ben onderweg naar Londen. Kan er nu even niet bij
Stephan Verstuurd vanaf mijn iPhone Op 12 jun. 2011 om 11:28 heeft Johan Brichau <[hidden email]> het volgende geschreven: > Hi all, > > I'm calling for people who have got the nginx file upload module to work in their seaside apps... > > We are trying to use the Nginx file upload module but are stuck when the request needs to get passed on to seaside. > We are using a configuration with a separate '/upload' location that gets handled by the file upload module. The request then needs to get passed to the upstream backend (seaside) but that request still has the URI '/upload' and we do not seem to get it rewritten to the '/seasideapp' URI. > > > Is there anyone who has this working completely and could give us some advice on how solve this? > > The relevant parts of our nginx conf look like this: > We also tried with a named location, but according to the docs, that makes the request arguments be dropped (and we need the _s & _k args for seaside...) > > Johan > > ---- > > location / { > include fastcgi_params; > fastcgi_pass seaside; > } > > # Upload form should be submitted to this location > location /upload { > > # Pass altered request body to this location > upload_pass /backend; > upload_pass_args on; > > > #Pass all fields of the form > upload_pass_form_field ".*"; > > # Store files to this directory > upload_store /var/www/documents/; > > # Set specified fields in request body > upload_set_form_field $upload_field_name.name "$upload_file_name"; > upload_set_form_field $upload_field_name.content_type "$upload_content_type"; > upload_set_form_field $upload_field_name.path "$upload_tmp_path"; > > upload_cleanup 400 404 499 500-505; > } > > location /backend > { > rewrite ^/upload/(.*) /seasideapp/$1 last; > } |
Free forum by Nabble | Edit this page |