masterzen / nginx-upload-progress-module

Nginx module implementing an upload progress system, that monitors RFC1867 POST uploads as they are transmitted to upstream servers.
http://wiki.codemongers.com/NginxHttpUploadProgressModule
Other
432 stars 101 forks source link

PHP-FPM Config refuses to validate& start nginx #31

Open thomascrown opened 12 years ago

thomascrown commented 12 years ago

For security reasons, the PHP-FPM proxy pass config in a sites conf file should be structures as follows:

location ~ .php$ { if (-f $request_filename) { fastcgi_pass 127.0.0.1:9000; } fastcgi_split_path_info ^(.+.php)(/.+)$;

fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;

    include fastcgi_params;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

The thing is, adding track_uploads uploads 60s; after the fastcgi_pass doesnt work as it triggers a warning when I try to start nginx (saying you can put it in IF statements).

However for security reasons the If statement out to stay there.... Is there any fix/workaround?