Welcome! Log In Create A New Profile

Advanced

Re: how to make nginx find my assets that are not in my public/?

Maxim Dounin
August 16, 2011 06:06PM
Hello!

On Tue, Aug 16, 2011 at 04:24:26PM -0500, Patrick Aljord wrote:

> On Tue, Aug 16, 2011 at 4:12 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:
> > Hello!
> >
> > On Tue, Aug 16, 2011 at 03:47:05PM -0500, Patrick Aljord wrote:
> >
> >> Thanks a lot Maxim, this worked great. This is how my conf looks like
> >> now, not sure if it's perfect yet but for anyone interested:
> >>
> >> http://pastie.org/private/8jat5h9kdagmvtxxzr9pcw
> >
> > You don't need all these if's in "location /", try_files is to
> > replace them all.
> >
>
> I get this error when I remove those ifs:
>
> 2011/08/16 16:23:17 [error] 9352#0: *1 directory index of
> "/home/pat/gitreps/shapado/public/" is forbidden, client: 127.0.0.1,
> server: localhost.lan, request: "GET / HTTP/1.1", host:
> "localhost.lan"

Ah, you need directories without index.html to be passed to app
server as well, right? Then use

location / {
try_files $uri $uri.html $uri/index.html @app;
}

location @app {
proxy_pass http://shapado_app_server;
proxy_set_header ...
}

...

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

how to make nginx find my assets that are not in my public/?

Patrick Aljord August 16, 2011 03:24AM

Re: how to make nginx find my assets that are not in my public/?

Maxim Dounin August 16, 2011 04:56AM

Re: how to make nginx find my assets that are not in my public/?

Patrick Aljord August 16, 2011 04:48PM

Re: how to make nginx find my assets that are not in my public/?

Maxim Dounin August 16, 2011 05:14PM

Re: how to make nginx find my assets that are not in my public/?

Patrick Aljord August 16, 2011 05:26PM

Re: how to make nginx find my assets that are not in my public/?

Patrick Aljord August 16, 2011 06:00PM

Re: how to make nginx find my assets that are not in my public/?

Maxim Dounin August 16, 2011 06:06PM

Re: how to make nginx find my assets that are not in my public/?

Patrick Aljord August 16, 2011 06:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 88
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready