Get rid of args from $request_uri

2017-08-08 Thread chilly_bang
Hi I want to build a construction like location ~* { if ($args ~ *) { add_header Link "<$scheme://$http_host$request_uri>; rel=\"canonical\""; } } but need to get rid of argues from $request_uri. The goal is from any url with parameters to point with canonical auf non-parameter url count

Re: Get rid of args from $request_uri

2017-08-08 Thread c0nw0nk
why don't you use $uri $is_args $args This will build the URL like. index.php ? arguement=value&moreargs=morevalue $request_uri will always output the full URL. Not individual segments of it. If you want the first part of the url only just use $uri on its own. http://nginx.org/en/docs/http/n

Re: Get rid of args from $request_uri

2017-08-08 Thread chilly_bang
c0nw0nk Wrote: --- > why don't you use > > $uri Is it not so, that $uri will output an encoded url? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275930,275937#msg-275937 ___ nginx maili

Re: Get rid of args from $request_uri

2017-08-08 Thread Zhang Chao
On 8 August 2017 at 22:02:32, chilly_bang (nginx-fo...@forum.nginx.org) wrote: c0nw0nk Wrote: --- > why don't you use > > $uri Is it not so, that $uri will output an encoded url? $uri is always the one decode once time and merge the slash(if y

nginx-1.13.4

2017-08-08 Thread Maxim Dounin
Changes with nginx 1.13.408 Aug 2017 *) Feature: the ngx_http_mirror_module. *) Bugfix: client connections might be dropped during configuration testing when using the "reuseport" parameter of the "listen" directive on Linux. *) B

Re: Get rid of args from $request_uri

2017-08-08 Thread Lucas Rolff
I use the set_misc module from openresty and do something like: if ($request_uri ~ "([^/?]*)(?:\?|$)") { set $double_encoded_filename $1; } set_unescape_uri $encoded_uri $double_encoded_uri; Can probably be improved, but I can use $encoded_uri and get the reslt you’re looking f

Building and packaging dynamic modules

2017-08-08 Thread Guilherme Capilé via nginx
Ola, I'm not sure if I should address this list or the nginx-devel, but I'd like to automate the installation/packaging of dynamic modules for nginx (right now focused on centos7). As far as I understood, dynamic modules can be compiled apart of the nginx installation, so if I got the source for

Re: [nginx-announce] nginx-1.13.4

2017-08-08 Thread Kevin Worthington
Hello Nginx users, Now available: Nginx 1.13.4 for Windows https://kevinworthington.com/nginxwin1134 (32-bit and 64-bit versions) These versions are to support legacy users who are already using Cygwin based builds of Nginx. Officially supported native Windows binaries are at nginx.org. Announce

Re: Problem with uWSGI and PATH_INFO

2017-08-08 Thread Francis Daly
On Sun, Aug 06, 2017 at 12:28:11PM +0200, Roberto De Ioris wrote: > > On Sat, Aug 05, 2017 at 11:47:24AM -0400, Etienne Robillard wrote: Hi there, > nginx is not able to correctly split PATH_INFO accordingly to SCRIPT_NAME That is correct. It is similarly correct that nginx is not able to know

Re: How to disable fastcgi caching for the logged user?

2017-08-08 Thread Francis Daly
On Mon, Aug 07, 2017 at 04:47:30AM -0400, Etienne Robillard wrote: Hi there, > Thank you for your reply. What is the difference between: > > fastcgi_no_cache $http_pragma $http_authorization > > and > > fastcgi_no_cache $remote_user http://nginx.org/r/fastcgi_no_cache http://nginx.org/r/$http