How to serve PHP files outside the public folder?

Francis Daly francis at
Mon Aug 26 22:14:10 UTC 2013

On Mon, Aug 26, 2013 at 11:12:15PM +0100, Francis Daly wrote:

> Probably one of "location ^~ /private/"; or else "location ~
> /private/*.\php$" before your "location ~ \.php$", should work.

That's "^/private/*\.php$", of course. Fat fingers...

Francis Daly        francis at

More information about the nginx mailing list