Re: Rewrite before regex location

2016-05-06 Thread Joyce Babu
Oops! The local configuration was *location ^~ @rewrite_news {...}* On Sat, May 7, 2016 at 3:54 AM, Joyce Babu wrote: > It is working fine on my mac. But when I try to use it on my Cent OS > server, it is failing with error > > nginx: [emerg] location "[^/]\.php$" cann

Re: Rewrite before regex location

2016-05-06 Thread Joyce Babu
It is working fine on my mac. But when I try to use it on my Cent OS server, it is failing with error nginx: [emerg] location "[^/]\.php$" cannot be inside the named location "@rewrite_news" Both are running version 1.10.0 :( ___ nginx mailing list ngin

Re: Rewrite before regex location

2016-05-06 Thread Joyce Babu
> > That's because your fastcgi_split_path_info pattern does not match - > .php is not followed by / in your rewritten url. > > Because of the location{} you are in, it is probably simplest to just > replace the second capture part of that pattern with (.*)$. > Thank you Francis. It worked after f

Re: Rewrite before regex location

2016-05-06 Thread Joyce Babu
uot;^/test/([a-z]+).php$" /test/test.php?q=$1 last; > > > > On Thu, May 5, 2016 at 5:13 AM, Joyce Babu wrote: > >> If you've got a messy config with no common patterns, you've got a messy > >> config with no common patterns, and there's not much yo

Re: Rewrite before regex location

2016-05-04 Thread Joyce Babu
> > If you've got a messy config with no common patterns, you've got a messy > config with no common patterns, and there's not much you can do about it. > > If you can find common patterns, maybe you can make the config more > maintainable (read: no top-level regex locations); but you don't want >

Re: Rewrite before regex location

2016-05-04 Thread Joyce Babu
Hi Francis, Thank you for the response. Possibly using "location ^~ /test/" would work? > > http://nginx.org/r/location > > You may want to rewrite to /test.php (with the leading slash), though. > > Although, better might be to just fastcgi_pass directly, rather than > rewriting. > > Something li

Rewrite before regex location

2016-05-04 Thread Joyce Babu
; set $fastcgi_script_name_custom $fastcgi_script_name; if (!-f $document_root$fastcgi_script_name) { set $fastcgi_script_name_custom "/cms/index.php"; } fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params;} Thank, Joyce Babu

Re: Multiple matching limit_req

2015-01-09 Thread Joyce Babu
Hi Francis, Thank you for the clever solution. I have updated my server configuration with the change and it is now working. ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Multiple matching limit_req

2015-01-09 Thread Joyce Babu
I would like to apply rate limiting based on 3 different criteria. 1. CDN should have rate limit of 100 r/s (identified by $http_host) 2. Whitelisted bots should have a rate limit of 15 r/s (identified by $http_user_agent) 3. All other users should have a rate limit of 5 r/s The rules should be a

Re: Nginx rewrite non-existent files under sub directory with rewrite rules

2014-11-28 Thread Joyce Babu
Hi Francis, Thank you for the suggestions. I will try them and revert. Regards, Joyce Babu ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Nginx rewrite non-existent files under sub directory with rewrite rules

2014-11-27 Thread Joyce Babu
I am getting a new dedicated server and need to decide between Nginx and Apache Event MPM. I have received expert advice to use Nginx, but unless I have a solution to this problem I am unable to move to Nginx. I have been trying to solve this for the past 3 days. I have been checking the Nginx debu

Nginx rewrite non-existent files under sub directory with rewrite rules

2014-11-26 Thread Joyce Babu
doing wrong here? Is there a simple way to have all existing files served depending on their extension and only non existent files match the location blocks / rewrite rules? Thanks & Regards, Joyce Babu ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx