Re: Configuring nginx for both static pages and fcgi simultaneously

2016-08-03 Thread Maxim Dounin
Hello! On Wed, Aug 03, 2016 at 07:07:53PM +0200, B.R. wrote: > I disagree: it is a good feature to check for script file existence before > calling PHP on it with something like: > try_files [...] =404; > It helps mitigating attacks by avoiding to pave the way to undue files > being interpreted.

Re: Configuring nginx for both static pages and fcgi simultaneously

2016-08-03 Thread B.R.
I disagree: it is a good feature to check for script file existence before calling PHP on it with something like: try_files [...] =404; It helps mitigating attacks by avoiding to pave the way to undue files being interpreted. That only works if the filesystem containing PHP scripts is accessible f

Re: Configuring nginx for both static pages and fcgi simultaneously

2016-07-31 Thread Maxim Dounin
Hello! On Mon, Aug 01, 2016 at 01:38:29AM +0200, Richard Stanway wrote: > Are you sure you don't want to use try_files for this? If a required handling is known in advance there is no need to use try_files and waste resources on it. -- Maxim Dounin http://nginx.org/ _

Re: Configuring nginx for both static pages and fcgi simultaneously

2016-07-31 Thread Richard Stanway
Are you sure you don't want to use try_files for this? http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files On Mon, Aug 1, 2016 at 1:15 AM, Maxim Dounin wrote: > Hello! > > On Sun, Jul 31, 2016 at 06:55:54PM -0400, Denis Papathanasiou wrote: > > > I have the following configuration

Re: Configuring nginx for both static pages and fcgi simultaneously

2016-07-31 Thread Maxim Dounin
Hello! On Sun, Jul 31, 2016 at 06:55:54PM -0400, Denis Papathanasiou wrote: > I have the following configuration file defined in > /etc/nginx/conf.d/my-project.conf (this is on debian). > > It does what I want, in that it serves static contet in the /css, /images, > /js folders along with index.

Configuring nginx for both static pages and fcgi simultaneously

2016-07-31 Thread Denis Papathanasiou
I have the following configuration file defined in /etc/nginx/conf.d/my-project.conf (this is on debian). It does what I want, in that it serves static contet in the /css, /images, /js folders along with index.html correctly. And for dynamic requests (I'm running an fcgi-enabled server on port 90