Works like a champ! Thanks for your help.by cgarver - Nginx Mailing List - English
As I have other countries like Canada to deal with, it can get rather unwieldy doing every permutation of case. What about something like this: rewrite (?i)^/us(.*)$ /us$1; location ^~ /us { proxy_pass http://backendcms/; proxy_set_header Host xxx.xxx.xxx; It seems to be allowing www.xxxx.xxx/uS/ to work. Not sure if there will be any pitfalls later...by cgarver - Nginx Mailing List - English
The problem with the looping was that I needed to update my subs_filter to eliminate the leading slash in pattern matches. So, it is now working very well except it is case sensitive which is bound to cause some issues. Is there a rewrite I can do to force the request to lowercase without killing server performance?by cgarver - Nginx Mailing List - English
Sorry to be a pain, but I cannot claim success yet. The good news - the image now appears. The bad news - the /us/ is now case sensitive and the www.xxxx.xxx/us/ site never returns. It's in some kind of loop. A page further down like www.xxxx.xxx/us/some-directory/some-page will work. location ^~ /us { proxy_pass http://backendcms/; proxy_set_header Host xxx.xxx.xxx;by cgarver - Nginx Mailing List - English
Thanks, but when I try that I cannot get nginx to start. >/etc/init.d/nginx restart : "proxy_pass" may not have URI part in location given by regular expression, or inside named location, or inside the "if" statement, or inside the "limit_except" block in /etc/nginx/national_sites.conf:4 configuration file /etc/nginx/nginx.conf test failedby cgarver - Nginx Mailing List - English
Glad to do so! from nginx.conf upstream backendcms { server 172.26.161.230; } from my location specific conf location ~* ^/us(.*)? { proxy_set_header Host xxx.xxx.xxx; proxy_pass http://backendcms$1; subs_filter ..... } It truly is the white-space causing the issue because I copied the "Member Images" folder to "Member-Images&qby cgarver - Nginx Mailing List - English
Thanks Matthieu. I've applied your patch, but unfortunately the behaviour remains the same. This format of link doesn't work. It reports a badly formed request: http://www.xxxxx.xxx/us/storage/113/images/Member%20Images/image-2-web.png But this better formatted URI does: http://www.xxxx.xxx/us/storage/113/images/blog/child-eating-health-food.jpg While it'd be nice to eliminate all whiby cgarver - Nginx Mailing List - English
Reposting to fix the grammar errors! Hello folks, I have tried both nginx 0.8.46 and 0.8.52 to reverse proxy a URI that contains a whitespace, but I'm having no luck. Any URI without a space loads just fine, but one that contains a white space results in a "Bad Request - HTTP Error 400. The request is badly formed." I had verified that the patch referenced above was in the sourby cgarver - Nginx Mailing List - English
Hello folks, I'm tried both nginx 0.8.46 and 0.8.52 to reverse proxy a URI with a whitespace, but I'm having no luck. Any URI without a space loads just fine, but one that contains a white space results in a "Bad Request - HTTP Error 400. The request is badly formed." I verified that the patch reference above was in 0.8.46. Are you folks about to reverse proxy a white space URby cgarver - Nginx Mailing List - English