Answer the question
In order to leave comments, you need to log in
Nginx doesn't respect link parameters in subrequests?
I use zip_mod in Nginx to create dynamic archives from files that are located on different physical servers. With something like this code, I send headers to Nginx so that it collects everything in one heap from sent to the user:
<?php
header('Content-Disposition: attachment; filename=' . $archiveName);
header('X-Archive-Files: zip');
echo implode("\r\n", $zip_files) . "\r\n";
exit();
array(4) {
[0] => string(140) "15263b8b 66000 /remote/127.0.1.1/files/private/ee4b41adb859ccce6be2fa0c45fc64f0.ini?name=php.ini&s=opPmjEJg5puHNciYvcRTeA,1359385713 php.ini"
[1] => string(170) "bc8706b1 8361107 /remote/127.0.1.1/files/private/154eeb7eef9e55ce2da97d9f7cd6fee5.zip?name=nginx-1.2.6-build.zip&s=yy_iJjDxnCaix-tzDlrZ0Q,1359385713 nginx-1.2.6-build.zip"
[2] => string(157) "9e7b9349 917698 /remote/127.0.1.1/files/private/597d93a30395e27a1f19f7e226187163.sql?name=tariff_dump.sql&s=Ob-V3hljvYODh0XVFU9dKQ,1359385713 tariff_dump.sql"
[3] => string(145) "e7310915 225234 /remote/127.0.1.1/files/private/350679e790a7f702a5d37bee444de9f3.jpg?name=other.jpg&s=cHEvdSj5lU__35Utl8IRkg,1359385713 other.jpg"
}
location ~* ^/remote/(.+?)/(.+)$ {
internal;
proxy_hide_header Content-Type;
proxy_pass http://$1/$2;
}
127.0.1.1/files/private/ee4b41adb859ccce6be2fa0c45fc64f0.ini
127.0.1.1/files/private/ee4b41adb859ccce6be2fa0c45fc64f0.ini?name=php.ini&s=opPmjEJg5puHNciYvcRTeA,1359385713
127.0.1.1/files/private/ee4b41adb859ccce6be2fa0c45fc64f0.ini?name=php.ini&s=opPmjEJg5puHNciYvcRTeA,1359385713
127.0.1.1/files/private/ee4b41adb859ccce6be2fa0c45fc64f0.ini
Answer the question
In order to leave comments, you need to log in
Try using the $args variable.
Something like:
proxy_pass http://$1/$2?$args
The module should write to the log
github.com/evanmiller/mod_zip/blob/master/ngx_http_zip_module.c#L564
Look at the log
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question