Problems getting case insensitive match to work

Igor Sysoev is at rambler-co.ru
Thu Nov 6 13:19:35 MSK 2008


On Thu, Nov 06, 2008 at 10:49:50AM +0100, Mario Gazzo wrote:

> I have for some reasons difficulties to get the following nginx setup  
> to respond case insensitive to www.mydomain.dk/demo. It only responds  
> to www.mydomain.dk/Demo. Shouldn't "~*" make the match case  
> insensitive? The nginx reverseproxy server runs linux whereas the  
> application server is Windows Server 2003 with IIS.
> 
> What am I doing wrong?
> 
> Cheers
> Mario
> 
> worker_processes  1;
> 
> events {
>     worker_connections  1024;
> }
> 
> http {
>     include    mime.types;
>     include    proxy.conf;
>     default_type  application/octet-stream;
> 
>     sendfile        on;
>     keepalive_timeout  65;
> 
>     upstream demo_hosts {
>           server  192.168.0.97:80;
>   	}
> 
> server {
>         listen 80;
> 
>         server_name  www.mydomain.dk;
> 
>         location ~* /Demo {
>         	proxy_pass http://demo_hosts/Demo;
>         }
> 
>     }
> }

Try

         location ~* ^/Demo {
         	proxy_pass http://demo_hosts;
         }

proxy_pass inside location with regex may not have URI part (/Demo).


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list