With pure Lua and no IF (crossposted in openresty group):
location / {
try_files $uri $uri/ =404;
index index.html index.htm;
}
location ~ \.php$ {
try_files $uri $uri/ =404;
rewrite_by_lua '
local s = 0; local
Maxim Dounin Wrote:
---
> And we even have a trac ticket for this:
>
> http://trac.nginx.org/nginx/ticket/86
A tested workaround with Lua and a single IF with a return then:
location ~ \.php$ {
try_files $uri $uri/ =404;
Hello!
On Sun, Jul 13, 2014 at 05:46:50PM -0400, itpp2012 wrote:
> Ok clear enough, I'd still consider it some kind of bug (it makes no sense
> for try_files to be disabled when an if matches), for example using map and
> a single IF does this as well which is more or less nginx's recommended way
Ok clear enough, I'd still consider it some kind of bug (it makes no sense
for try_files to be disabled when an if matches), for example using map and
a single IF does this as well which is more or less nginx's recommended way
of doing an IF with map.
Funny thing is when you have a .php location i
Hello!
On Sat, Jul 12, 2014 at 06:23:41AM -0400, itpp2012 wrote:
> Hmm, more debugging, this config returns a 404 from the backend (which it
> shouldn't):
>
> try_files $uri $uri/ =404;
> set $maintmode S;
> if ($remote_addr ~ "^(192.168.*.*)$") { set $maintmode L; }
> if (-f $document_root/mai
Hmm, more debugging, this config returns a 404 from the backend (which it
shouldn't):
try_files $uri $uri/ =404;
set $maintmode S;
if ($remote_addr ~ "^(192.168.*.*)$") { set $maintmode L; }
if (-f $document_root/maintenance_mode.html) { set $maintmode
"${maintmode}M"; }
if ($maintmode = SM) { re
Valentin V. Bartenev Wrote:
---
> On Friday 11 July 2014 17:42:41 itpp2012 wrote:
> > Ok, debug session here http://pastebin.com/DQ6WBYXU
> [..]
>
> It looks like one case of http://wiki.nginx.org/IfIsEvil
Maybe but should an if bypass try_files
On Friday 11 July 2014 17:42:41 itpp2012 wrote:
> Ok, debug session here http://pastebin.com/DQ6WBYXU
[..]
It looks like one case of http://wiki.nginx.org/IfIsEvil
wbr, Valentin V. Bartenev
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.
Ok, debug session here http://pastebin.com/DQ6WBYXU
I see one try_files phase, maybe a script is processed differently then a
static file.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,251650,251652#msg-251652
___
nginx mailing list
nginx@ng
Hello!
On Fri, Jul 11, 2014 at 03:36:19PM -0400, itpp2012 wrote:
> Simple php config (nginx 1.7.4 development);
>
> server {
> [...]
> location ~ \.php$ {
> try_files $uri $uri/ =404;
> index index.html index.htm index.php;
> fastcgi_ignore_client
Simple php config (nginx 1.7.4 development);
server {
[...]
location ~ \.php$ {
try_files $uri $uri/ =404;
index index.html index.htm index.php;
fastcgi_ignore_client_abort on;
fastcgi_pass myLoadBalancer;
fastcgi_index in
11 matches
Mail list logo